Unable To Update Attribute 'dateOfBirth' in Azure B2C

devopsfj 141 Reputation points


I am trying to update a user attribute 'dateOfBirth' which is documented here in MS Docs: https://learn.microsoft.com/en-us/azure/active-directory-b2c/user-profile-attributes

When I try to PATCH my user with the following for example:

    "dateOfBirth": "1982-12-26T00:00:00Z"


    "error": {
        "code": "Request_ResourceNotFound",
        "message": "Resource '' does not exist or one of its queried reference-property objects are not present.",
        "innerError": {
            "date": "2023-07-28T08:41:08",
            "request-id": "",
            "client-request-id": ""

Are the docs wrong?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,673 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 25,391 Reputation points Microsoft Employee

    Hi @devopsfj ,

    Thanks for reaching out.

    I understand you are trying to update dateofBirth attribute using Graph API patch request but unable to do so.

    dateofBirth is not a build in attribute in Azure AD B2C. It must be added as custom attribute which is by default stored in B2C as extension_{B2C appId-without-hyphens}_dateofBirth.

    To update the dateofBirth custom attribute, you need to send patch request to the name stored in B2C as below:

    User's image

    and able to get the response as

    User's image

    Hope this will help.



    Please remember to "Accept Answer" if answer helped you.