cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k1ng
Helper I
Helper I

Issues with "Get user photo (V2)" in O365

Hey All,

 

I am trying to build a small global address book in a flow for my bot.  Everything is going smoothly expect the photo, I can't seem to grab it from my flow, it's completing however without any photos..  Anyone is using that or anything else for grabbing photos?

TopicTopic

 

FlowFlow

 

Logs (it is completing but no length on the image?)Logs (it is completing but no length on the image?)  

 

Trying to make a card, you know?
No image :(No image 😞

 

Thank you for your help!!

-n

3 REPLIES 3
Expiscornovus
Super User II
Super User II

Hi @k1ng,

 

Can you try this expression for your Get User Photo (V2) action. This is using an index value of [0] to get the first item.

 

outputs('Search_for_users_(V2)')?['body/value']?[0]?['UserPrincipalName']

 

If you still prefer the first function you could also use this expression

first(outputs('Search_for_users_(V2)')?['body/value'])?['UserPrincipalName']

Both of expressions got the same results, @Expiscornovus:6.PNG

 

Least it got something on the length however now I am getting an authorization error, do I need to add a permission on scope for that?

Also this is the right way to grab it from the flow?
7.png

 

Or any other way to get an user's photos?

-n

 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (59,885)