How to allow external/guest users to view profile pictures

B, Kyle 1 Reputation point
2022-05-10T04:40:34.7+00:00

We're using SharePoint Online as a portal for our clients, who have been invited to our Azure environment, and would like the clients to be able to see the Office 365/Outlook profile pictures of our employees. I'm using PnPjs to retrieve the photo and it works fine when our employees are logged in. They can view profile pictures of other employees. When a client is viewing the SharePoint site, PnPjs throws a 401 Unauthorized error when retrieving the picture.

I parsed the token while logged as a test external account (using an @harsh.com .com email but the clients will be using their company email) and the token has the following scopes

User.Read

User.Read.All

User.ReadBasic.All

profile

openid

email

in Azure, our Guest User Access is set to "Guest users have limited access to properties and memberships of directory objects".

Is there something I'm missing? Or is this how it's supposed to work? Thanks.

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2022-05-10T07:51:47.343+00:00

    You cannot, profile pictures are not exposed externally/without authentication.

    3 people found this answer helpful.

  2. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2022-05-10T08:44:58.643+00:00

    Hi @B, Kyle ,
    As far as I know, there is no such function for external users to access user profile. External users can only share with documents, data, and lists. The highest permission of external user can't access sharepoint admin center user profile too. You can refer to following documents.
    https://learn.microsoft.com/en-us/microsoft-365/solutions/collaborate-in-site?view=o365-worldwide


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.