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?
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).
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.".
Thanks for the reply but that didn't work, not sure why. What did work was Office365Users.UserPhoto(First(EmployeeProfile).Mail)
Hit the same problem and was searching the old threads. I managed to solve it using the following code:
If(Office365Users.UserPhotoMetadata("firstname.lastname@example.org").HasPhoto, Office365Users.UserPhoto("email@example.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.
Your chance to join an engaging competition of Power Platform enthusiasts.
The Super User program for 2022 - Season 2 has kicked off!
Attend in person or online, there are incredible conferences and events happening all throughout the month of September.
In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.