user1500960
user1500960

Reputation:

How to get the profile picture of user from Azure AD B2C

I am trying to fetch the profile picture of a user from Azure AD B2C. Is it possible to do that?

Upvotes: 0

Views: 3994

Answers (1)

Jason Ye
Jason Ye

Reputation: 13954

I am trying to fetch the profile picture of a user from Azure AD B2C

I think I understood your explanation, you want to get user's ThumbnailPhoto.

If I understand it correctly, We can use PowerShell to get it:

Connect-AzureAD
Get-AzureADUserThumbnailPhoto -ObjectId '85a293bb-xxxx-448b-xxxx-c927991c26a2' -FileName jasonye -FilePath 'd:\adtest'

After that, user's photo will store to D:\adtest, and it's name is jasonye.

More information about this command, please refer to this article.

Also, we can use Graph API to get photo:

GET https://graph.microsoft.com/beta/users/[email protected]/photo/$value

More information about graph API, please refer to this article.

Upvotes: 1

Related Questions