How to Get User Profile Picture

%3CLINGO-SUB%20id%3D%22lingo-sub-85411%22%20slang%3D%22en-US%22%3EHow%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-85411%22%20slang%3D%22en-US%22%3E%3CP%3EHow%20can%20I%20pull%20a%20person's%20picture%20from%20their%20O365%20User%20Profile%20and%20display%20on%20a%20form%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-85411%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-215276%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20How%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-215276%22%20slang%3D%22en-US%22%3E%3CP%3EHave%20you%20tried%20with%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOffice365Users.UserPhoto(%3CEM%3EUserID%3C%2FEM%3E)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20%3CEM%3Euserid%3C%2FEM%3E%20just%20need%20to%20put%20the%20user%20principal%20name%20or%20email%20for%20the%20person%20whose%20picture%20you%20want%20to%20see.%3C%2FP%3E%3CP%3EAnd%20if%20you%20want%20to%20see%20your%20own%20it%20would%20be%20like%3A%26nbsp%3BOffice365Users.UserPhoto(Office365Users.MyProfile().Id)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20this%20to%20work%20you%20would%20need%20to%20connect%20O365Users%20data%20source%20first.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20it%20helps%20somehow.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-154480%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20How%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-154480%22%20slang%3D%22en-US%22%3E%3CBLOCKQUOTE%3E%3CHR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2836%22%20target%3D%22_blank%22%3E%40Ryan%20Stone%3C%2FA%3E%20wrote%3A%3CBR%20%2F%3E%3CP%3EYes%20that%20works%20but%20only%20for%20the%20current%20logged%20in%20user.%20But%20what%20about%20other%20users%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CHR%20%2F%3E%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%2B1.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20having%20the%20exact%20some%20problem%20with%20no%20luck.%20PowerApp%20templates%20like%20Shoutouts%20seem%20to%20make%20use%20of%20some%20kind%20of%20functionality%20like%20this%2C%20but%20I%20can't%20tell%20how%20to%20replicate%20it%20in%20really%20simple%20terms...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-144488%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20How%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-144488%22%20slang%3D%22en-US%22%3EAnyone%20got%20the%20answer%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87847%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20How%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87847%22%20slang%3D%22en-US%22%3E%3CP%3EYes%20that%20works%20but%20only%20for%20the%20current%20logged%20in%20user.%20But%20what%20about%20other%20users%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%20using%20the%20sample%20Employee%20Directory%20app%20I%20would%20like%20to%20extend%20it%20to%20show%20a%20person's%20picture%20when%20you%20pull%20them%20up%20in%20the%20app.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-87843%22%20slang%3D%22en-US%22%3ERE%3A%20How%20to%20Get%20User%20Profile%20Picture%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-87843%22%20slang%3D%22en-US%22%3EIf%20you%20are%20using%20PowerApps%20you%20can%20insert%20an%20Image%20Control%20on%20the%20form%2C%20then%20use%20the%20following%20formula%20for%20the%20Image%20attribute%20in%20the%20data%20section.%20User().Image%20More%20info%20here%20on%20User()%20%3CA%20href%3D%22https%3A%2F%2Fpowerapps.microsoft.com%2Fen-us%2Ftutorials%2Ffunction-user%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fpowerapps.microsoft.com%2Fen-us%2Ftutorials%2Ffunction-user%2F%3C%2FA%3E%3C%2FLINGO-BODY%3E
Frequent 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.