cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emmebi
Frequent Visitor

Power Automate - retrieve O365 user display name and email

I am trying to retrieve in Power Automate the display name and/or the email of the user who submitted data through my canvas Power App (inside the Details field of a "Start and wait for an approval" step). I have been trying to use many fields already available in the Dataverse for Teams table where data are saved, but I cannot obtain more than a guid (I have tried with "Created By (Value)", "Created By (Delegate) (Value)", "Owner (Value)"). Is there some expression, or some other way to retrieve the fields (at least Display Name and Email) related to the user who submitted the data though the Power App ?

 

Thanks,

 

2 REPLIES 2
KvB1
Solution Specialist
Solution Specialist

The "Created By" is a Claim, which Power Automate returns as an array. If you want to grab the mail or display name for it, you'd need to loop the value through a For Each and grab the mail or display name from there

emmebi
Frequent Visitor

Sorry for the delay. Are you sure that CreatedBy is an array ? trying to use an ""Apply to each" to it, I get the error "The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/_createdby_value']' is of type 'String'. The result must be a valid array."

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (2,750)