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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to display a specific user's photo

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Microsoft Employee 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard