Showing results for 
Search instead for 
Did you mean: 
Post Partisan
Post Partisan

Office365Users.UserPhotoMetadata Error "ResourceNotFound" and "InvalidUserID" Error.



In my app i want to display user images based on List and O365 group.

In my scenario user data is stored in a SP list and not stored in a O365 group.


Am using the following formula to get a Users image in a gallery,

If(!IsBlank(ThisItem.RecipientEmail) <> Concat(MembersfromSG.mail,mail), If(!IsMatch(ThisItem.RecipientEmail, Match.Email) || Right(ThisItem.RecipientEmail, Len(ThisItem.RecipientEmail) - Find("@", ThisItem.RecipientEmail)) <> _myDomain || !Office365Users.UserPhotoMetadata(ThisItem.RecipientEmail).HasPhoto, 'profilepic-generic-user', Office365Users.UserPhoto(ThisItem.RecipientEmail)))


Here is RecipientEmail is a List field column and MembersfromSG is a O365 group collection.


Here am getting error in aOffice365Users.UserPhotoMetadata failed error "ResourceNotFound" and "ErrorInvalidUser" error.


Now i need to display users img in a gallery.


How to do it?





Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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,405)