We have gallery and in that gallery we are displaying user photo , most of the time it displays error "Office365Users.UserPhotoV2 failed. The Server returned http error with code 0. Below is my code to display photo based on ID.
Note : I have tried Office365Users.UserPhoto as well and see same issue.
I see first time and some time it works but most of the time i am seeing errror but data is displayed & sometimes error is displayed and data is not displayed , If I refresh it works fine again for first try and if try some more time it shows error.
Kindly let me know if any other details are required.
When I put User().Image I do get my own image but when I do the Office365User connector for my own profile it is blank.
BTW: The .HasPhoto method returns false all the time.
At this point in time we are still using Exchange on Prem, we plan to move to the cloud later. If this is the reason then I wonder if there is a way to get the user photo of someone else in the same way as User().Image is dong it?