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 / Office365Users.UserPho...
Power Apps
Answered

Office365Users.UserPhoto not displaying photo

(0) ShareShare
ReportReport
Posted on by 65

I am having a terrible time trying to get a photo to dispaly:

 

Office365Users.UserPhotoV2(ThisItem.email)

ThisItem.email resolves correctly to an email address. I have also tried by pulling the id directly from the connector:

Office365Users.UserPhotoV2(Office365Users.MyProfileV2().id)

And I've tried manually entering the email address:

Office365Users.UserPhotoV2("myemail.company.org")

The image is just blank. I updated my profile picture this morning (I didn't have one previously). It shows up in the top right of the PowerApps design page, but isn't showing up in the top right of office.com. It does show up when I look at my profile settings in office.com (wierd).

 

Maybe this is a problem with the profile picture and not my code?

 

Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    Try a different user's email to see if you can retrieve their photo.  I've used that connector to get photos for display in the past with no issues. But it can take a significant amount of time before your profile photo gets updated.  I would suspect that's the problem and not your code.

  • K-A-R-L Profile Picture
    715 on at

    Hi @kman42 ,

    You can try using the Set() function and the email address as global variable.
     

    On the OnStart:
     Set(MyProfile,Office365Users.MyProfile());

    It may take some time to profile pic to sync. Deleting your cache and using another browser might work.

    Cheers

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @kman42 ,

     

    Check on below blog:
    http://toddbaginski.com/blog/how-to-display-office-365-user-profile-images-in-powerapps/

     

    I just tested with the formula included and it works for me.

    If(
     IsBlank(ThisItem.Id),
     'profilepic-generic-user',
     If(
     Not(UserDomain.Text = MyDomain),
     'profilepic-generic-user',
     (
     If(
     Office365Users.UserPhotoMetadata(ThisItem.Id).HasPhoto = true,
     Office365Users.UserPhoto(ThisItem.Id),
     'profilepic-generic-user')
     )
     )
     )

    Regards,

    Mona

  • suariokbea Profile Picture
    14 on at

    For the ones that still can't make this work I found out a work around following the solution of this post.

    In my case I was looking for a work around for iPad.

    I found out that the profile image came from Sharepoint:

    https://[yourcompanyname].sharepoint.com/_layouts/15/UserPhoto.aspx?Size=L&AccountName=  + [User Email]

    But when you write this link on the image value , sometimes PowerApps dont pull the content of the image, it just "reads the link value", so it is not going to render in the canvas. So what I did was to make a PowerAutomate Flow to Pull the content  of that link:

    Steps:

    • Make a Instant Clod Power Automate Flow triggered form PowerApps
    • Select the Send an HTTP request to SharePoint and configured it as follow (you need to send from powerapps the desired Email):
    • image.png
    • This is going to retrieve the type-content and content , you can filtered it by adding a Compose step and setting the value to 
    • image.png

    • outputs('Send_an_HTTP_request_to_SharePoint')?['body'].$content
    • Send back the content to Power Apps selecting the "Respond to a PowerApp or flow" connector
    • image.png
    • In power apps you just need to set in OnStart rule the next sentence  
    • Set(
      varContent;
      'NameOfYourFlow'.Run(User().Email).content
      );;
    • And due the content is in base64 format you need to set the value of the desired image as
    • "data:image/jpeg;base64," & varContent

    Tada Magic! Hope It helps someone

  • Maria007 Profile Picture
    2 on at

    i found this solution worked for me instead

    "https://[tenantName].sharepoint.com/_layouts/15/UserPhoto.aspx?Size=L&AccountName=" & First(EmployeeProfile).Mail

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard