web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is it possible to get ...
Power Automate
Answered

Is it possible to get the ID of a person who has activated the flow?

(0) ShareShare
ReportReport
Posted on by

Hello, 

Hope everyone is well.


I am trying to create unique IDs with users' names and wondered, if the following solution is possible to accomplish with Power Automate?

1. User A is logged to a SharePoint site;

2. User A clicks Power Automate button in the SharePoint list to active the flow;

3. Power Automate recognizes that it was activated by User A and saves user's name and surname, for example.

 

Would sincerely appreciate an advice. 

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Anonymous,

     

    Just to validate. With activate you mean who triggered an existing flow on the list? If yes, this should be possible. You can get the user name of the identity which triggered the flow from the headers.

     

    Below is a small example to demonstrate.

     

    1. Create a flow with the SharePoint For a selected item trigger. Configure it to use a specific list, in this case Captureuser

    captureuser.png

    2. Add a Compose action and add the following expression to it:

     

    triggerOutputs()['headers']['x-ms-user-name']

     

     

    xmsusernameheader.png

     

    3. Make a Note of your flow Id

    flowidusername.png

     4. Add a button to your list, in this case the CaptureUser list. Create a column called Button (type single line of text). Add the following json to it and replace the flow id by your flow id. This way you can click that button and trigger your flow.

    {
     "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
     "elmType": "button",
     "customRowAction": {
     "action": "executeFlow",
     "actionParams": "{\"id\": \"5086d422-c666-4840-bbb1-bb894fc59d20\"}"
     },
     "attributes": {
     "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
     },
     "style": {
     "border": "none",
     "background-color": "transparent",
     "cursor": "pointer"
     },
     "children": [
     {
     "elmType": "span",
     "attributes": {
     "iconName": "PowerButton"
     },
     "style": {
     "padding-right": "6px"
     }
     },
     {
     "elmType": "span",
     "txtContent": ""
     }
     ]
    }

     

    formatcolumnsharepoint.png

  • Community Power Platform Member Profile Picture
    on at

    Hi, @Expiscornovus.

    many thanks for your elaborate response!

     

    Regarding the "active" - yes, I meant "trigger":) 

    By the way. does a word "headers" mean "column headers" as shown in the screenshot below? If yes, would it mean that user name would have to written in the header?

    mantastg08876_0-1605691296452.png

     




  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Anonymous,

     

    No, I mean the Response Headers from the trigger action in the Power Automate Flow. The flow is aware who triggered it.

     

    You can extract that information from one of the properties of the Response Header, in this example either x-ms-user-name or x-ms-user-email.

     

    triggerhttpresponseheaders.png

  • Community Power Platform Member Profile Picture
    on at

    @Expiscornovus , thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard