I have a canvas app with the SharePoint and the Office365Users connectors. I would like to display a user's Office 365 photo in a gallery if the user has a photo, or show a generic profile photo if they don't. The connected SharePoint list includes a person field, which is where the user photos are coming from.
The gallery works as intended by displaying the user's photo if they have one and showing a generic profile image if they don't. However, I'm getting this error when I run the app:
Here's what I have for the Image property on the photo in the gallery:
If(Office365Users.UserPhotoMetadata(ThisItem.SP_Person.Email).HasPhoto = true, Office365Users.UserPhotoV2(ThisItem.SP_Person.Email), 'No-Profile-Photo')
Here's the warning from Power Apps on the formula for the Image property: "This formula uses scope..."
Solved! Go to Solution.
Thanks! That seems to work. I updated the Image property on the photo in the gallery to this:
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.