DEV Community

Discussion on: Using custom claims for Azure AD B2C roles

Collapse
 
aswque profile image
aswque

Thank you for that.
Unfortunately, it didn't works for me, it seems like that the extension_Role claim is not been read (the claim is check on my SignIn/SignUp policy). I am using .NetCore3.1 and services.AddSignIn to call the login page. Can you please share how you are doing the authentication part (services.Configure and services.AddAuthentication)?

Collapse
 
p_gururani profile image
Pradeep Gururani

You also need to call app.UseAuthorization(); in addition to adding this policy. You need to add custom attribute Role to your User object. Have you done that?