Error with Azure AD B2C federation with Entra ID

Rory Braybrook
The new control plane
May 24, 2024
Image of an error symbol
PKua, Public domain, via Wikimedia Commons

I was trying to set up the Identity provider in B2C and got this message:

AADB2C: A claim with id 'UserId' was not found, which is required by 
ClaimsTransformation 'CreateAlternativeSecurityId' with
id 'CreateAlternativeSecurityId'

This made no sense because I had the claims correctly mapped, and I was using “oid” as the “User ID”.

Image of claims mapping as per the doc. https://learn.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-azure-ad-single-tenant?pivots=b2c-user-flow#configure-microsoft-entra-id-as-an-identity-provider

I tried a few things but then added “profile” to the scope, and it all worked!

Image of scope showing openid and profile

All good!

--

--

Rory Braybrook
The new control plane

NZ Microsoft Identity dude and MVP. Azure AD/B2C/ADFS/Auth0/identityserver. StackOverflow: https://bit.ly/2XU4yvJ Presentations: http://bit.ly/334ZPt5