web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to display a speci...
Power Apps
Unanswered

How to display a specific user's photo

(0) ShareShare
ReportReport
Posted on by

I'm building an app for my team's use and need a way to display their images. How would I do this?

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    @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

  • Community Power Platform Member Profile Picture
    on at

    Hi, I put the full name of the user in place of gblUserID but it still won't display their picture?

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi@hari3,

    Based on the issue that you mentioned, do you want to display users's images?

    Could you please share a bit more about the scenario?

    Office365Users.UserPhotoMetadata() expects the userid(Principal Name/ Email ID) of the user for which we want to search data for.

    Please make sure that you are passing correct data inside office365 function. 

    In my scenario, I have a SP list containing a Person column named 'Senior' storing the team users.

    Add a Gallery and set the Image property as below:

    If(
     !IsBlank(ThisItem.Senior.Email),
     If(
     Office365Users.UserPhotoMetadata(ThisItem.Senior.Email).HasPhoto = true,
     Office365Users.UserPhotoV2(ThisItem.Senior.Email),
     SampleImage
     )
    )

    ppp.png

    Hope it could help.

    Regards,

    Qi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard