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
Super User

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,382)