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

Community site session details

Session Id :
Power Apps
Unanswered

User profile photo

(0) ShareShare
ReportReport
Posted on by 240

Hello,

 

I am hoping to have profile pictures included in my app.

 

I have a gallery setup, which has rows of a unique identifier for each individual, with the unique identifier within a text label. I am hoping to combine this with "@companyemail.com" to be able to have the profile picture displayed of who the row is referring to which will be within what i believe is referred to as a nested gallery - or a screen that is displayed upon clicking a view profile button on my main screen.

 

Please could someone advise on what powerfx formula i would use to be able to do this?

 

Many thanks

Chris

 

Appy1_0-1682590515817.png

 

 

Categories:
I have the same question (0)
  • TikshaAggarwal Profile Picture
    on at
    Re: User profile photo

    Hi @Appy1 ,

    If you want to show the current logged in user Profile Picture, Simple add following in Image property of image

    User().Image

     

    If you want to show the image of selected user who created the item from gallery, you can use this.

    Gallery.Selected.'Created By'.Picture

     

    I also recommend you follow the blog to add initials of name if no user image found.

    Power Apps Display A User Photo Or Initials - Matthew Devaney

     

     Hope this helps.

     

    Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.

  • Meg5 Profile Picture
    38 on at
    Re: User profile photo

    @Appy1 ,

     

    If email from gallery is office account, you can use Office 365 user connector in the app to get photo.

    I recommended you check this link first to have some understand about connector definition, and can use other connectors supported by Microsoft in the future.

    https://learn.microsoft.com/en-us/connectors/office365users/#binary 

  • CC-19121430-0 Profile Picture
    240 on at
    Re: User profile photo

    Thanks both, i have given it a go and i can get the picture to show up but not the initials.

    Please could you help with what i am doing wrong here? 

    Many thanks 

    Chris

     

    This is my image property:
    If(
    !IsBlank(SystemID2_lbl_1&"@email.com")
    And Office365Users.UserPhotoMetadata(SystemID2_lbl_1&"@email.com").HasPhoto,
    Office365Users.UserPhotoV2(SystemID2_lbl_1&"@email.com"),
    Concatenate(
    Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").givenName, 1),
    Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").surname, 1)
    )
    )

  • TikshaAggarwal Profile Picture
    on at
    Re: User profile photo

    Hi @Appy1 ,

    As you were unable to see initials if no user image exists. I guess this is because you didn't add the button control on place of image. Set X & Y properties to ensure the button appears in exactly the same position as of image.

     

     If a profile picture exists, the initials should not show so we check the photo with the IsBlank function in the Visible property of the button.

    Visible: 

     

    IsBlank(User_image)

     

    Add the following code to the text property of button as well.

     

    Concatenate(
    Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").givenName, 1),
    Left(Office365Users.UserProfileV2(SystemID2_lbl_1&"@email.com").surname, 1)
    )

     

    PFA attached screenshot for reference

    TikshaAggarwal_0-1682659465539.png

     

    Note: Also make sure to input valid email of user.

    Hope this helps.

     

     

  • CC-19121430-0 Profile Picture
    240 on at
    Re: User profile photo

    Thank you so much @TikshaAggarwal !

     

    It looks great now with the initials 🙂 The only issue now is the pictures no longer appear just initials for everybody, have i missed something?

     

    Many thanks

    Chris

  • CC-19121430-0 Profile Picture
    240 on at
    Re: User profile photo

    Hi @TikshaAggarwal 

     

    Sorry i realised i hadn't put the visible property of the button to the IsBlank part you had mentioned.

     

    I wasnt able to do this as i have a variable in their named InfoPopUP to make the button appear when 'view profile' is selected.

     

    How would i have both things in there?

     

    Many thanks

    Chris

  • Verified answer
    TikshaAggarwal Profile Picture
    on at
    Re: User profile photo

    Okay then you can check for both for the visible property of button

    IsBlank(image) && infoPopup

     

    Thanks, 

    Tiksha

    Please click Accept as solution if this helped you solve your issue. This will help others find it more readily. It also closes the item. Please consider giving it Thumbs Up.

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 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard