Hi @John Stephens • Thank you for reaching out.
As you don't want to collect InternalUserid during signup and want to populate the value later, you need to:
- Uncheck the checkbox for this custom attribute under Azure AD B2C > your_user_flow > User attributes so that users don't get the text box to populate the value for this attribute.
- Select the checkbox for InternalUserid attribute under Azure AD B2C > your_user_flow > Application claims so that once the attribute value is populated later, it can be returned as claim in the token.
--------------------------------------------------------------------------------------------------------------
Below are the optional steps that you can use for verification purposes.
To confirm if the value of this attribute can be configured after signup, you can use the below graph call using Graph Explorer and sign in with Global Admin of B2C tenant created by using Azure AD > Users > +New user option:
Call:
Patch https://graph.microsoft.com/beta/users/object_id_of_signed_up_user
Body:
{
"extension_2ad62axxxxxxxxxxxxfd85dea302d1b5_InternalUserid": "value_to_be_assigned"
}
Where, 2ad62axxxxxxxxxxxxfd85dea302d1b5 is the application id of Azure AD> App Registrations> b2c-extensions-app (without hyphens).
Run GET https://graph.microsoft.com/beta/users/object_id_of_signed_up_user
to see the value you have assigned to the InternalUserid attribute.
You can also run your user flow to confirm the value you have assigned to the custom attribute is returned in the token.
-----------------------------------------------------------------------------------------------------------
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.