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 / Displaying photos with...
Power Apps
Answered

Displaying photos with Office365Users.UserPhotoV2() and Office365Users.UserPhotoMetadata()

(0) ShareShare
ReportReport
Posted on by 69

So I've built an employee directory and I am having issue with the employee photo.

 

On the Main Screen I have the photos displaying with this:

If(Office365Users.UserPhotoMetadata(ThisItem.UserPrincipalName).HasPhoto = true,Office365Users.UserPhoto(ThisItem.Id),clipart3293928)

 

On the Selected Screen I am using the following:

If(!IsBlank(ThisItem.UserPrincipalName), Office365Users.UserPhotoV2(ThisItem.UserPrincipalName), clipart3293928)

 

However I am still throwing  the following error. Additionally on the Selected Screen the clipart does not show when the user doesn't have a photo either.  Any ideas?

PowerApps PhotoMetadata Error.PNG

Categories:
I have the same question (0)
  • Verified answer
    BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @Acruz5 ,

     

    For the Main screen, there may be miniscule moments where the data is not available which will cause an error instantaneously, so I suggest to include an IfError function to handle any errors:

     

    If(
    	IfError(
    		Office365Users.UserPhotoMetadata(ThisItem.UserPrincipalName).HasPhoto,
    	false),
    	Office365Users.UserPhoto(ThisItem.Id),
    	clipart3293928
    )

     

    For the Selected screen use:

     

    If(
    	!IsBlank(
    		IfError(
    			Office365Users.UserPhotoV2(ThisItem.UserPrincipalName),
    			Blank()
    		)
    	),
    	Office365Users.UserPhotoV2(ThisItem.UserPrincipalName),
    	clipart3293928
    )	

     

  • Acruz5 Profile Picture
    69 on at

    @BCBuizer Thanks. That sort of works. It no longer errors out all the time. However, when selecting someone without a photo the clipart doesn't show.

     

  • BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi @Acruz5 ,

     

    For which of the two formulas is this issue?

  • Acruz5 Profile Picture
    69 on at

    The selected screen.

  • Verified answer
    BCBuizer Profile Picture
    22,844 Super User 2026 Season 2 on at

    Hi  @Acruz5 , 

     

    Please try the same formula as for the Main screen:

    If(
    	IfError(
    		Office365Users.UserPhotoMetadata(ThisItem.UserPrincipalName).HasPhoto,
    	false),
    	Office365Users.UserPhoto(ThisItem.Id),
    	clipart3293928
    )

     

  • Acruz5 Profile Picture
    69 on at

    That works. Thank you.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard