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.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.