cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Get e-mail of user who triggered flow

I've created a flow that runs for selected SharePoint item list.

I should be able to get details about user who triggered flow from "For a selected item" action.

 

There are these properties available from "For a selected item" action, however when the Flow is attached to SharePoint Teams site,

it returns these properties in encoded way.

 

image.png

 

image.png

 

Everything works fine when same flow is attached to regular SharePoint stie.

 

I've noticed all these values come from header of the request, so I can get them using following formula:

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

 

but it's far from user friendly and regular users have no chance to know they can get it this way. (And especially if it works for regular SPO sites).

 

Does anyone else face same problem or is it problem of our tenant only?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper II
Helper II

Re: Get e-mail of user who triggered flow

@v-alzhan-msftI believe it's not by design, but bug. See what's coming in header. Everything is there. That property takes encoded value instead of decoded and that's bug.

 

msissue1.jpg

 

msissue2.jpg

 

@ScottShearerworkaround for now is to take decoded property from header directly instead of using User email property. You can use

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




View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Get e-mail of user who triggered flow

@marekbuban 

I believe this is a bug - I can replicate the behavior.  I am reporting it in the "I found a bug" forum.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Community Support
Community Support

Re: Get e-mail of user who triggered flow

Hi @marekbuban ,

 

I could reproduce this issue on my side, don't know if it is a bug or if it is by design.

I would report this issue to product team and would reply here once I get the answer.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Community Support
Community Support

Re: Get e-mail of user who triggered flow

Hi @marekbuban ,

 

I got the answer that it is by design.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Super User
Super User

Re: Get e-mail of user who triggered flow

@v-alzhan-msft 

It seems odd that this behavior is by design.  Can you provide an explanation as to why it was designed in that manner and how it can be worked-around?

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Community Support
Community Support

Re: Get e-mail of user who triggered flow

Hi @ScottShearer ,

 

Sorry for I don't get the explanation.

I'm just know this would be same in the button flow.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Helper II
Helper II

Re: Get e-mail of user who triggered flow

@v-alzhan-msftI believe it's not by design, but bug. See what's coming in header. Everything is there. That property takes encoded value instead of decoded and that's bug.

 

msissue1.jpg

 

msissue2.jpg

 

@ScottShearerworkaround for now is to take decoded property from header directly instead of using User email property. You can use

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




View solution in original post

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (6,434)