cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wagnerfraga
Frequent Visitor

UserPhotoMetaData UserID Error

Hey guys,

 

Sorry, I know that there are many discussion opened about this matter but I didn't understand if there is a solution or if Microsoft team is working on it.

I have tried many ways to avoid the error but without success. What is funny is that the code is working, but with this annoying error message.

 

Code

If(Office365Users.UserPhotoMetadata(sharepointID).HasPhoto=true,Office365Users.UserPhotoV2(sharepointID),SampleImage)

Error:

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

IMG_B0545BE8702B-2.jpeg

16 REPLIES 16

I have tried but unfortunately I still getting the error.

It is so frustrating because it is working but showing this error. I can't publish this version with this error being showing to the users.

 

Thank you so much for your support and time.

@wagnerfraga 

 

There is one more thing I would suggest you to try out. Try exporting the app in the current state and import it as a new app and then try it out. It might work that way!

 

Hope this Helps!

It is so frustrating, I have tried what you have suggested but no success. 😕

 

Untitled-1.jpg

Hey @wagnerfraga It is frustrating but can we give it another try? 

 

Expression: If(!IsBlank(ThisItem.Email),If(Office365Users.UserPhotoMetadata(ThisItem.Email).HasPhoto=true,Office365Users.UserPhotoV2(ThisItem.Email),SampleImage))
 
Please try to use this one. There is a similar thread which resolved the error by putting a if condition around the ID and then referring to the same ID in office365 connector.
 
 
Hope this Helps!
 

View solution in original post

Thank you for dedication and persistence!

You are THE guy!

 

Not it is working perfectly and withou this %$# error message.

 

Many Many Many thanks,

Wagner

@wagnerfraga  Glad that it Worked!!

powerappissue.png

I am still getting a similar error with the following formula:

 

If(!IsBlank(ThisItem.Mail),
If(Microsoft365Users.UserPhotoMetadata(ThisItem.Mail).HasPhoto=true,
Microsoft365Users.UserPhoto(ThisItem.Mail)))

 

Any ideas? I feel like I have tried everything. No errors appear in the app checker, and it can be published, and it works fine, but it keeps throwing this error.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,106)