With this neat little technique you can identify the user who invoked a flow from a Power App or other trigger

Flow User

identifying the user

The user’s name, email or GUID can be identified and captured, and it’s as simple as initialising a string variable and setting its value to one of the following

triggerOutputs()[‘headers’][‘x-ms-user-name’]

triggerOutputs()[‘headers’][‘x-ms-user-email’]

triggerOutputs()[‘headers’][‘x-ms-user-id’]

Nice and simple!

A couple of items to bear in mind:

It only works at the top level, ie the flow directly invoked from a Power App.  It won’t work for a child flow.  In reality that’s not a problem, simply capture the data in the first flow and pass to child flows as a variable

The GUID returned is the user’s GUID in Active Directory, not the GUID for the user’s record in the User table for the current environment, which is different


Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top