cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marekbuban
Advocate II
Advocate 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

@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
ScottShearer
Super User III
Super User III

@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
v-alzhan-msft
Community Support
Community Support

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.

v-alzhan-msft
Community Support
Community Support

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.

@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

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.

@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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (2,502)