Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Handling error messagen when an O365 user doesn’t have a photo.



I have done a PowerApp that shows a profile of an Office 365 User.


It shows this information:


  • Name.
  • Telephone.
  • Email.
  • Photo.
  • Other kind of data.

All data comes from AD except the Photo that the user can upload it he or she wants. This gives me a problem because if the user doesn´t upload it the power app gives the user an error message in bright red.

I can’t allow it to appear but I don’t find any function/formula to capture it before appearing in the screen. Looking in the forum I have tried this formula:


If(!IsBlank( ThisItem.CorporateUser.Picture); Set(vEmpty;"NO"); Set(vBl vEmpty anco;"YES"))


  • CorporateUser is an Office365 SharePoint User Field.
    • Before accessing the profile screen I filter a SharePoint list and get this Filed (it is never a group, always a user)

The vEmpty variable is always “NO”, even when the user has not uploaded a pic.


After this formula has been executed I have this One (The one thas gives the error when the user doesn’t have a pic):




My plan is to create a formula that, depending on the value of vEmpty shoes the user photo or a sample image (when the user doesn’t have one) because right now it shows errors in the screen (and when there is more than an image element all screen gets red with error messages). I will combine both formulas.


Could anyone give me any help/idea? I don’t mind if its correcting the first formula I worte ( If(!IsBlank….) or any other solution.


Thank You!


Community Support Team
Community Support Team

Re: Handling error messagen when an O365 user doesn’t have a photo.



Try with below formula to see if this would work:


Notice that even though the app works fine, the 404 errors are annoying and don't make a good experience. MS is already awared of this issue. 


For your reference:





Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level: Power Up

Re: Handling error messagen when an O365 user doesn’t have a photo.

Thank you, I am going to try it and tell about it.


I didnt find that post when I searched, thank you again Smiley Happy

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 227 members 4,642 guests
Please welcome our newest community members: