As the title, i'm trying but still found no solution. This is flow: User <-> Blazor.Client <-> Blazor.Server <-> External APIs.
- Blazor.Client: MSAL Authentication
- Blazor.Server: MicrosoftIdentityWebApi Authentication
Can I use my custom Claim server to provide Permission claims to authorize users after they logging in successfully at Azure AD?
Thank you!
Below is my idea about authorization:
- Each Role has collection of Permissions: Contact.Read, Contact.Create, Posts.Create, Posts.Read, Posts.Detele, etc....
- Each User has 0-many Roles.
- Each Role can be assigned to 0-many Users.
- Each Action/Controller in Blazor.Server, and each Component in Blazor.Client is authorized or rendered by using current User Permissions.
I have searched and read many blogs, but i can do nothing except logging in at login.microsoftonline.com then redirect to my app.
To use custom claim server to provide permission claims make use of below PowerShell commands like below:
"acceptMappedClaims": true-> saveapi://<GUID>) tohttps://<yourTenantDomain>-> Update the scopeFor more in detail, please refer below links:
https://github.com/Azure-Samples/active-directory-dotnet-desktop-msgraph-v2/issues/50#issuecomment-598429976
https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-claims-mapping#omit-the-basic-claims-from-tokens