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 @outlook.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
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.