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

@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 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
Highlighted
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.

Highlighted
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.

Highlighted

@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

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

@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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (13,379)