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

Announcements

News and Announcements icon
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 Microsoft Employee

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,951 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
    Microsoft Employee 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,951 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
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 241 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 179

#3
Haque Profile Picture

Haque 159

Last 30 days Overall leaderboard