We are using Angular8 and ASP.Net Core with WebApi
Implementation :
We have implemented Msal authentication in API end using the claim identity.
We have sealed the controller with Authorize attribute.
We are not able to pass to role and productid from Angular to Asp.net Core.
Now , when we try to add Role based authorization , we have done the below things :
-
Added the role attribute to the Claims.
-
Sealed the controller with “Authorize Roles = ‘role name’
Issue : We are facing some issue when setting “Authorize Roles = ‘role
name’ as we are not able to set the roles.