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 / Office365User Photo Er...
Power Apps
Unanswered

Office365User Photo Error Message

(0) ShareShare
ReportReport
Posted on by 551

Hello!

 

Does anyone know who to resolve this error message?  It doesn't stop my Power App from functioning as it should, or showing the User's photo, but it's not ideal for the users to see!

 

My image is taken from a component:

 

User = Office365Users.MyProfileV2()

UserPhoto = IfError(If(UserProfile.UserHasPhoto,Office365Users.UserPhotoV2(UserProfile.User.id)),SampleImage)

UserhasPhoto = If(!IsBlank(UserProfile.User.id),Office365Users.UserPhotoMetadata(UserProfile.User.id).HasPhoto)

 

RMD211_1-1675859143670.png

 

 

Office365Users.UserPhotoMetadata failed: The method 'UserPhotoMetadata' has an invalid value for parameter 'userId'

 

RMD211_0-1675858667374.png

 

Categories:
I have the same question (0)
  • Clem Profile Picture
    130 on at

    Not sure if it's because of your copy/paste but your input parameter on the component is "User" while in the formula you use : "UserProfile", what's record type is it and where it comes from ?

    Since the "UserPhoto" formula is using "IfError", so there is a default fallback to the sampleimage while it's not the case on the "UserhasPhoto" formula.

  • RM-30040732-0 Profile Picture
    551 on at

    My component itself is called UserProfile.  If I change User to say UserProfile it throws up so many new errors!

  • Clem Profile Picture
    130 on at

    Then it's weird the way you do it is fine. since it's working from my side.

    Maybe the user parameter is not getting the user record properly and accessing the Id then crash.
    Can you try adding a "iferror" on the metadata function too ?

    What are the output of the user & userphoto inputs ?

     

  • RM-30040732-0 Profile Picture
    551 on at

    Tried adding iferror and still getting the same message.

    fError(If(!IsBlank(UserProfile.User.id),Office365Users.UserPhotoMetadata(UserProfile.User.id).HasPhoto),false)

     

    It's weird because it is finding the correct user and photo.  I have noticed there is a delay in displaying it however.  Do I need to do anything perhaps OnStart of the app??  If I navigate around my app and go back to this page I don't get the error appearing again.

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

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard