Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Extract Office UPN from Power Apps Trigger

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I am aware that I can extract username and email from a Power Apps trigger by using the below:

 

 

@{triggerOutputs()?['headers']?['x-ms-user-email']};
@{triggerOutputs()?['headers']?['x-ms-user-name']}

 

 

However, I wish to be able to extract the "UPN" because I need to be able to pull manager information so that my flow will look like the following:

ashleynicholson_0-1719504874705.png

I have attempted to put the following:

 

 

@{triggerOutputs()?['headers']?['x-ms-user-id']}

 

 

into the "Get User Profile" connector's "User (UPN)" input, however this causes the flow to break. The flow does not fail, it in fact does not run at all so I am unable to see diagnostics. Does anyone have any suggestions? Thanks in advance.

  • AN-31011359-0 Profile Picture
    on at
    Re: Extract Office UPN from Power Apps Trigger

    I'm actually still having an issue with adding to the table in Excel. If I remove the user profile connector then it will add the row, but now I get this error:

     

    ashleynicholson_0-1719564348039.png

     

  • Expiscornovus Profile Picture
    32,131 Most Valuable Professional on at
    Re: Extract Office UPN from Power Apps Trigger

    Hi @ashleynicholson,

     

    If you want to return data from the flow itself to your app you want to use this action.

     

    Below is an older Microsoft (2018 release notes of this feature) document which explains this in a bit more detail:

    https://learn.microsoft.com/en-us/business-applications-release-notes/april18/microsoft-flow/return-data-powerapps

     

  • AN-31011359-0 Profile Picture
    on at
    Re: Extract Office UPN from Power Apps Trigger

    Hi, this has resolved the issue (I didn't need to refresh the flow), and I believe that it was the "Respond to Power App" connector that I was missing. However, I don't understand how it fixed it and I'm unable to find documentation online that properly explains it, so if you have a few minutes can I ask for you to explain it please? Thanks in advance.

  • Verified answer
    Expiscornovus Profile Picture
    32,131 Most Valuable Professional on at
    Re: Extract Office UPN from Power Apps Trigger

    Hi @ashleynicholson,

     

    Your setup looks ok, just tried the same property and that returns the UPN in a Get User Profile (v2) action.

     

    Since it is not triggering at all, have you tried refreshing the flow?

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-flows#refresh-a-flow

     

    Below was my test for the repro btw.

     

    1. Canvas App with button

     

    upnfound.png

     

    2. Flow setup for the test

     

    triggeroutputs_example.png

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1