I have followed the Set up sign-up and sign-in with an Azure AD B2C account from another Azure AD B2C tenant article using the user flow
policy type.
Everything works as expected until I try to customise the identity provider claims mapping in the Configure Azure AD B2C as an identity provider section.
I am attempting to map a custom user attribute to the User ID
claim, the mapping works if I map it to a different claim e.g. Given Name
.
For example, I have a custom user attribute named Clock Number
in the Fabrikam B2C tenant, when I run the sign in/up user flow the sub
claim is the ObjectID
of the user and I can see the custom attribute in the token.
In the Contoso B2C tenant, I map extension_ClockNumber
to Given Name
and run the sign in/up user flow the clock number is correctly mapped to given_name
however I am not sure what value is mapped to the sub
claim – it is not the ObjectID
of the user as it was in the previous example.
When I map extension_ClockNumber
to User ID
and run the user flow it is not mapping as it did to Given Name
, I would have expected the value of extension_ClockNumber
to appear in the sub
claim.