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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,162)