Hi
As a proof of concept, I'm trying to build a flow that will post an adaptive card to a Teams channel with my profile mugshot in the message body.
The only components I can find to return my profile image, return the raw content, rather than a URL....is there a way to get this working?
Thanks Fraser! Was stuck in this for a long while now. Your answer really helped. This idea worked, I just had to change
"url": "data:image/png;base64,@{outputs('Compose')}",
to
"url": "data:image/jpeg;base64,@{outputs('Compose')}",
and it worked fine for me. I wanted to use user profile image in adaptive card(to be displayed on Outlook app) and was able to achieve that.
This worked perfectly for me, thank you!
None of the prior options worked for me. I think due to 302 redirect errors in the 'Send a HTTP Request to Sharepoint' action. The response didn't return any redirected location so I was stuck.
"https://teams.microsoft.com/api/mt/apac/beta/users/8:orgid:<user ID>/profilepicturev2?displayname=<display name>&size=HR96x96"
What worked for me was to construct the above URL used by Teams for user photos. This includes a user ID (e.g. '3666e81d-07ba-628e-b633-51db53a564c3') that I noticed was included in the output from 'List group members'. Filter this output by 'User Principal Name' = email address of the user (case-sensitive so I used toLower()) to find the relevant member.
toLower(triggerOutputs()?['body/Assigned/Email'])
in the adaptive card, the user picture is posted via:
{
"type": "Image",
"style": "Person",
"size": "Small",
"url": "https://teams.microsoft.com/api/mt/apac/beta/users/8:orgid:@{items('Apply_to_each')?['id']}/profilepicturev2?displayname=@{items('Apply_to_each')?['displayName']}&size=HR96x96"
}
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
29 | |
28 | |
27 | |
20 | |
10 |