There may be several reasons why the user role remains null during .net custom claims identity authentication, including:
Authorization configuration: The role information may not be properly configured in the authorization system, leading to a lack of role information being attached to the user's identity.
Role information not included in the user's claims: The role information may not be included in the user's claims, either because it was not requested during the authentication process or because it was not properly added to the claims.
Role information not properly mapped: If the role information is present in the authentication system but not properly mapped to the claims, it may not be available to the application.
To resolve this issue, it is important to review the authentication and authorization configuration to ensure that the necessary role information is properly included in the user's claims and that the application is able to access and use this information correctly. Additionally, proper mappings from authentication and authorization sources can improve user identification and authentication measures.
Asked: 2021-10-19 11:00:00 +0000
Seen: 7 times
Last updated: Sep 11 '21