@Anonymous add the Office365Users connector to your app and then use the following expression:
If(
!IsBlank(gblUserID),
Office365Users.UserPhotoV2(gblUserID),
SampleImage
)
Where gblUserID is a variable that has the user name of the user for whom you want to display a photo.
For example, if you have a gallery of users, the expression would change to:
If(
!IsBlank(ThisItem.'User Name'),
Office365Users.UserPhotoV2(ThisItem.'User Name'),
SampleImage
)
---
If you like this reply, please give kudos (Thumbs Up). And if this solves your problem, please mark this reply as a solution by selecting Accept as Solution. This makes it easier for others to find answers to similar questions.
Thanks!
Hardit Bhatia
Microsoft Business Applications MVP
Microsoft Certified Trainer MCT
Blog | Twitter | LinkedIn | Facebook | YouTube | Email