简体   繁体   中英

Adding roles to Angular SPA and MSAL when using using Azure AD B2C

Using Angular 7 with MSAL.js and Azure AD B2C.

Implementing a role-based authentication is not directly supported by Azure AD B2C and requires the use of Azure Ad Graph API.

https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/10123836-get-user-membership-groups-in-the-claims-with-ad-b

Authorize By Group in Azure Active Directory B2C

Is there a way to use MSAL with Azure AD Graph API to support roles (through claims or Azure AD B2C security groups)?

You can add roles in the manifest of an application registration, that way you will get a roles claim with those roles defined.

Here is an article on how to create roles: How to add app roles in AAD .

If you are using groups instead you can associate a role to each group.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM