User Photo URL

New Contributor

Hello I hope you can help me with a question, we developed a web part that shows the user's photo, the photo is obtained from "" The problem we have is that the users do not have access to "", is there any other way to get the user's photo?



3 Replies
I tested on my tenant and could get my own and others' photos, why do you say your users don't have access to the url?

@Andres Gorzelany 


Access to the site ( was disabled for tenant users, since it is a site that is not being used, only global administrators have access to that site. With users who are global administrators the webpart works without problems. The webpart does is to look for the user's photo to display it, but since the user does not have access to the site (, the webpart fails. We gave access to the site ( to a user with the problem, and immediately the web part worked correctly. So we are checking if the user's photo can only be obtained from the tenant's site (

Oh I understand better now
Idk how complex is the webpart however, maybe you will need to explore the Graph API to get the Profile Photo?