How to Get User Profile Picture

Iron Contributor

How can I pull a person's picture from their O365 User Profile and display on a form?

5 Replies
If you are using PowerApps you can insert an Image Control on the form, then use the following formula for the Image attribute in the data section. User().Image More info here on User() https://powerapps.microsoft.com/en-us/tutorials/function-user/

Yes that works but only for the current logged in user. But what about other users?

 

For example using the sample Employee Directory app I would like to extend it to show a person's picture when you pull them up in the app. 

Anyone got the answer?

@Ryan Stone wrote:

Yes that works but only for the current logged in user. But what about other users?

 



+1.

 

I'm having the exact some problem with no luck. PowerApp templates like Shoutouts seem to make use of some kind of functionality like this, but I can't tell how to replicate it in really simple terms...

Have you tried with

 

Office365Users.UserPhoto(UserID)

 

Where userid just need to put the user principal name or email for the person whose picture you want to see.

And if you want to see your own it would be like: Office365Users.UserPhoto(Office365Users.MyProfile().Id)

 

For this to work you would need to connect O365Users data source first.

 

Hope it helps somehow.