cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeffw
Regular Visitor

Displaying User Photo in Org Browser

Trying to display the users profile photo that is searched for in Org Browser. Displays everything fine, manager, job title, email address, but will not display their photo.

 

Looked at the O365 Users connector site, along with Get user_photo_(V2). Tried several functions but nothing seems to work.

 

What should the function should look like to display the searched for employee’s profile photo? 

 

Thanks

5 REPLIES 5
jeffw
Regular Visitor

More Information: Using Office365Users.UserPhoto(ThisItem.Id) as syntax. Getting error on "ThisItem.Id", says "invalid name". It doesn't recognize ThisItem.Id. I am new to PowerApps, does this have to be declared somewhere to work? Am I missing a PowerApp update?

 

Office365 connection works fine, can see information about employee that is searched for in Org Browser app. Only problem is when I add an image with the above syntax to see their profile photo (which does exist). 

 

Thank you

Are you doing this on the GallerySearchUser and did you add an image control to the card? I just tried your code and it worked. I also tried Office365Users.UserPhoto(ThisItem.Mail) and that worked. At least they both worked as long as the user had a picture to display otherwise I got the error "Office365Users.UserPhoto failed: The server returned an HTTP error With code 404.".



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Thanks for the reply but that didn't work, not sure why. What did work was Office365Users.UserPhoto(First(EmployeeProfile).Mail)

Please define "EmployeeProfile" in your formula. Was it equal to Office365Users.SomeFunction()?

Hit the same problem and was searching the old threads. I managed to solve it using the following code:

 

If(Office365Users.UserPhotoMetadata("username@org.com").HasPhoto, Office365Users.UserPhoto("username@org.com"), SampleImage)

 

Paste the above code into the Image property of an Image Control. Obviously change the email addresses to something valid in your organisation.

Helpful resources

Announcements
PA 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

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (59,498)