Hi,
After following this tutorial and trying to run the user flow using Azure AD login I keep getting this error:
AADB2C: A claim with id 'UserId' was not found, which is required by ClaimsTransformation 'CreateAlternativeSecurityId' with id 'CreateAlternativeSecurityId' in policy 'B2C_1_test_v2' of tenant 'xxx.onmicrosoft.com'.
I believe everything is set up properly in the Azure AD and Azure B2C side since I can login without issues with my AD account through B2C. Local accounts are fine and I can see all the claims.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@goncalvesj Thanks for your feedback! We will investigate and update as appropriate.
@goncalvesj We are testing this scenario in our labs and will update the thread accordingly.
@shashishailaj I figured what the problem was. On the setup of the identity provider you need to add the "profile" scope. As soon a I changed that the missing claim was passed on the id token from the external Azure AD.
We are glad that you were able to resolve this. Thank you for sharing the solution with the community . We will now proceed to close this thread as it does not seem anything is pending at this point . We will try to see how we can incorporate this within our documentation .
Thanks again .
Most helpful comment
@shashishailaj I figured what the problem was. On the setup of the identity provider you need to add the "profile" scope. As soon a I changed that the missing claim was passed on the id token from the external Azure AD.