1

I currently have a user login flow through a B2C working through custom policies, with multiple external tenants. After login i have a Nuxt website which exchange calls with a ASP.NET Core 6 Rest API.

I wish to fetch the logged in user profile picture if they have one. preferably in the Rest API where i would like to store it.

So what would be the best way of getting the profile pictures? And How would one do so?

GoWiser
  • 857
  • 6
  • 20

1 Answers1

1

Retrieving the user's photo using the Microsoft Graph API is currently not supported in Azure AD B2C tenants.

enter image description here

I also verified it in my side, you also can follow the way to check it.

enter image description here

enter image description here

Jason Pan
  • 15,263
  • 1
  • 14
  • 29
  • Is it possible for a workaround? – GoWiser May 02 '23 at 06:36
  • @GoWiser I try to upload the avatar in the portal, and click save after uploading. When I refresh the page, the avatar is not updated, so I think there is no workaround. – Jason Pan May 02 '23 at 06:57
  • @GoWiser The official document clearly stated that it is not supported, and then I tried it from the azure portal, providing an entry to modify the avatar, but the modification failed, which means that we cannot find the available restapi through the http request. – Jason Pan May 02 '23 at 08:28
  • 1
    @GoWiser Of course, if you want, you can [try this workaround](https://stackoverflow.com/a/63531728/7687666) by creating custom api. – Jason Pan May 02 '23 at 08:35