cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RuiBarbosa
Helper I
Helper I

Error: Office365Users - User Photo

Hi,

 

I have this code in a picture control:

Office365Users.UserPhoto(Office365Users.MyProfile().Id)

 

But, if an user does not have an image, the following error is returned:

The service returned an error: Office365Users!UserPhoto: The server returned an 404 error (NotFound).

 

error.png

 

 

 

 

 

 

 

 

 

Is there any way to validate if an user has an image before calling the respective method?

 

Thanks,

Rui Barbosa

 

 

 

20 REPLIES 20
Salim_ELB
Frequent Visitor

Maybe it's really late for an answer but with 

Office365Users.UserPhotoMetadata(ThisItem.UserPrincipalName).HasPhoto 

I had the same question and I found it through this discussion 😉 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,674)