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 ?
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
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."