Azure AD B2C Upload Profile image of the user

Muhammad Usman shaikh 66 Reputation points
2021-03-12T10:00:02.253+00:00

Hi,

I want to upload my user profile image to azure ad b2c from graph api and fetch it too through graph api.

Any sample or documentation related to it.

thank you.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,636 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,439 questions
{count} vote

2 answers

Sort by: Most helpful
  1. James Hamil 21,546 Reputation points Microsoft Employee
    2021-03-16T23:49:13.137+00:00

    Hi, in B2C you can use these Graph API's. You can try to use the profilePhoto resource type which lets you get/update a photo.
    This may work:

    GET https://graph.windows.net/myorganization/users/{user_id}/thumbnailPhoto?api-version  
    PATCH https://graph.windows.net/myorganization/users/{user_id}?api-version  
    

    If this answer helped you, please mark it as "Verified" so other users may reference it.

    Thank you,
    James


  2. Nitin Gupta 0 Reputation points
    2023-05-25T04:22:06.59+00:00

    Microsoft Azure AD B2C currently doesn't handle profile pictures gracefully and there is a bug reported.

    https://learn.microsoft.com/en-us/answers/questions/1042453/(bug)-changing-users-thumbnail-in-azure-ad-b2c-doe

    Also, Microsoft retired Azure AD Graph API and migrating to Microsoft Graph API, the associated graph API endpoint is currently not supported for profile pictures.

    https://learn.microsoft.com/en-us/graph/api/profilephoto-update?view=graph-rest-1.0&tabs=http#:%7E:text=Updating%20a%20user%27s%20photo%20using%20the%20Microsoft%20Graph%20API%20is%20currently%20not%20supported%20in%20Azure%20AD%20B2C%20tenants

    So there is no solution to store profile pictures in Azure ADB2C as of now.

    This is quite disappointing.

    0 comments No comments