Can I use personal ID numbers as unique IDs for clients in Azure AD B2C?

Clara Chan 0 Reputation points
2024-07-17T07:43:17.3666667+00:00

I am exploring Azure AD B2C for my business, which requires collecting a client ID number. The object ID is automatically generated when the client signs up, but I would like to assign their personal ID number as an additional unique ID or as the object ID itself. Is this possible in Azure AD B2C? I have researched and still unable to find an answer. Thank you.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,910 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Francisco Marrero 251 Reputation points
    2025-03-10T17:52:40.0066667+00:00

    In Azure AD B2C, you can use custom attributes to store additional information, such as a personal ID number, for your clients. However, you cannot replace the automatically generated object ID with a personal ID number. The object ID is a unique identifier assigned by Azure AD B2C and cannot be modified.

    To achieve your goal, you can create a custom attribute to store the personal ID number and use it as an additional unique identifier. Here’s how you can do it:

    Create a custom attribute: In the Azure portal, navigate to your Azure AD B2C tenant, and go to the "User attributes" section. Add a new custom attribute for the personal ID number.

    Update user flows: Modify your user flows (sign-up, sign-in, etc.) to include the custom attribute. This will allow you to collect and store the personal ID number during the user registration process.

    Access the custom attribute: You can access the custom attribute using the Microsoft Graph API or Azure AD B2C policies to manage and utilize the personal ID number as needed.

    For more information on user profile attributes and custom policies in Azure AD B2C, you can refer to the official documentation. https://learn.microsoft.com/en-us/azure/active-directory-b2c/user-profile-attributes

    Please mark as helpful if you like my answer.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.