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

Community site session details

Session Id : vfr6PtEZQ7Ope2VuTNsAW9
Power Automate - Building Flows
Answered

Extract Office UPN from Power Apps Trigger

Like (0) ShareShare
ReportReport
Posted on 27 Jun 2024 16:16:50 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.

I have the same question (0)
  • AN-31011359-0 Profile Picture
    on 28 Jun 2024 at 08:45:54
    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,205 Most Valuable Professional on 28 Jun 2024 at 08:31:38
    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 28 Jun 2024 at 08:24:36
    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,205 Most Valuable Professional on 27 Jun 2024 at 21:25:54
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete