We have implemented Azure B2C authentication for a Dynamics Power Portal. The sign-in flow has been working seamlessly for the majority of users over the past nine months. However, recently a few users have encountered issues during sign-in. In most cases, users are being redirected to the default error page. One user has been redirected to the “Register your external account” page. From my understanding, this is because B2C is not returning the right claims to the Portal and I am not sure if this is related.
Troubleshooting Steps Taken:
- Verified that the user has an entry in the External Identities table in CRM.
- Confirmed that the user is using the correct (same) email address.
- Checked that the correct claims are being returned from B2C using the jwt.ms tool (User performed this step).
Despite these checks, I havent been able to find anything that is wrong and the issue persists for the same handful of users. There doesn’t seem to be a consistent theme in terms of the technologies (browser, device, ad blocker, etc) used by the affected users.
Below is a sample error message from the portal logs:
RequestData:
RequestPath:/Account/Login/ExternalLoginCallback,
RequestExtension:,
SessionId:XXXXXX,
UserId: XXXXXXXXXXXXXXXX
CorrelationId:XXXXXX,
Elapsed:15.3248,
MemberName:ApplyClaimsMapping,
SourceFilePath:C:__w1sSamplesMasterPortalAreasAccountControllersLoginController.cs,
SourceLineNumber:3547,
Category:Authentication,
Message:Can't find contact attribute to perform claims mapping.,
ErrorCategory:UserError
Additional Information:
- The portal has been operational and stable for nine months.
- The issue started occurring recently without any known changes in the authentication configuration.
- I have not been able to reproduce the issue
Portal Error Message Example
External Login Page Image
Any insights or suggestions on how to resolve this issue would be greatly appreciated. Thank you!
Pakesy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.