Skip to main content
Community site session details

Community site session details

Session Id : FKSCfhvMlLordmmimYz4kC
Power Apps - Building Power Apps
Answered

User profile photo

Like (0) ShareShare
ReportReport
Posted on 27 Apr 2023 10:16:40 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

 

 

  • Verified answer
    TikshaAggarwal Profile Picture
    on 28 Apr 2023 at 08:56:42
    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.

  • CC-19121430-0 Profile Picture
    240 on 28 Apr 2023 at 08:44:10
    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

  • CC-19121430-0 Profile Picture
    240 on 28 Apr 2023 at 08:38:31
    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

  • TikshaAggarwal Profile Picture
    on 28 Apr 2023 at 05:26:54
    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 27 Apr 2023 at 14:30:45
    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)
    )
    )

  • Meg5 Profile Picture
    38 on 27 Apr 2023 at 10:43:21
    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 

  • TikshaAggarwal Profile Picture
    on 27 Apr 2023 at 10:28:22
    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.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1