AD B2C Custom Policies auto-account-linking
I am currently trying to replicate the following custom policy sample:
https://github.com/azure-ad-b2c/samples/tree/master/policies/auto-account-linking
I generated all the needed things with the setup tool from the documentation, everything seems to have been generated correctly.
For some reason, when I am trying to login with, for example google, in order to see if the auto linking does in fact work I get the following error on App insights:
A Claim of ClaimType with id "userIdentity" was not found, which is required by the ClaimsTransformationImpl of Type "Microsoft.Cpim.Data.Transformations.AddItemToUserIdentityCollectionTransformation" for TransformationMethod "AddItemToUserIdentityCollection" referenced by the ClaimsTransformation with id "AppendUserIdentity" in policy "B2C_1A_AccountLink_Extensions" of tenant "tenant.onmicrosoft.com".
This is not making a lot of sense because as seen in the sample code provided, in the AccountLinkExtensions.xml, the "userIdentity" claimType is in fact declared.
Been stuck on this for a couple days, any clue why this may be happening ?