0
votes

I am useing AAD B2C to authenticate users in my application. In SAML there is a possibility to transform the NameID using a NameIdPolicy. It allows for instance to get a short unique id for the user (see persistent NameId).

I would like to achieve the same in AAD B2C Application, as it serves a legacy application that requires a short unique id. The built-in object id (guid) is far too long as the max number of char is 16.

Can we do some claim transformationm with AAD B2C similar to the SAML one in AAD Enterprise Applications ?

Looking at Claims Transformation in B2C Policies. Not sure I can achieve it this way: https://docs.microsoft.com/en-us/azure/active-directory-b2c/claimstransformations

1
Hi @Raphael Can you please provide an example of the shorter ID?Chris Padgett

1 Answers

2
votes

Assuming you're sending claims back using a B2C custom policy, you can choose any claim that matches your needs for a short NameID instead of a default claim of objectId.

<SubjectNamingInfo Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" ClaimType="YOUR_CLAIM_ID" />

You can choose to set YOUR_CLAIM_ID based on your business needs.