Jun 23 2017 03:45 AM
Jun 23 2017 03:45 AM
Hi,
We are trying to use Microsoft Flow for different scenarios - and we came across the need to get "current user" - meaning the user, who starts the flow manually - and not the user, who published the flow.
We do have an action called "Office 365-users - Get current profile"-something, but it takes the user who published the flow...
Any help will be appreciated!
Jun 23 2017 06:27 AM
The user who starts a flow is not known to the flow service unless the trigger provides it.
You mention manually starting a trigger. Assuming that means a flow button, you can get the User email and User name properties from the "Manually Trigger a Flow" trigger. When displaying the dynamic content, scroll to the bottom of the list for the trigger.
Jun 24 2017 08:18 AM
Jun 27 2017 06:38 AM
The SharePoint item triggers provide the Created By and Modified By properties.
Jun 28 2017 04:39 AM
Hi Poul,
Well - that does reflect who originally created or modified the ListItem (or document) - not the user, who selects a Listitem or document in SharePoint and choosing a flow to start manually, like this:
Aug 24 2017 10:52 PM
Nov 16 2017 03:25 AM
Nov 16 2017 03:25 AM
I'm also having this issue - Has anybody found a workaround?
Jan 09 2018 02:35 PM
Jan 09 2018 02:35 PM
Jan 10 2018 01:47 AM
Jan 10 2018 01:47 AM
Hi Christopher - Hopefully this will save you the time!
Flow does run based upon the executing user rather than the person who produced the flow.
I found that my issue was due to a step earlier In the flow where the list item that triggered the flow is moved to a different location. By executing this step, I became the "Created by" user, which was my variable used to direct the flow through an approval.
I did feel silly when I worked it out!
Thanks for looking though
Aug 03 2018 01:41 PM
Hi Dave!
While this issue isn't identical to the one I am experiencing, it is the closest occurrence I have found so far. I am working on a document approval Flow that triggers when a file is created in a folder. The next step is Get My Profile (v2) in order to associate the document being reviewed with its author. This way, our manager can know for whom the document is being approved. So far, this flow always associates the user who originally created the flow with the document needing approval, rather than the user triggering the flow by placing a document in the specified folder.
Are there any workarounds for this?
Much appreciated!
- A
May 29 2019 08:37 AM
For getting the person who caused the flow to run based on a ShPt list NewItem trigger, use the dynamic property "Created By Email" to determine who the creator of the document is. If you need to get that user's name, use their email as input for the Office 365 connector's "Get User Profile (v2)" function. See ScottShearer's answer with screenshots here: https://powerusers.microsoft.com/t5/Building-Flows/Get-executing-user-in-Flow/td-p/135386