My system consists of Angular front end and .Net Core API back end. Both are registered as separate Active Directory apps within the Azure Portal.
Consequently, both apps are secured by Azure AD. API is exposed and consumed by authenticated users on Angular front end.
The problem is - I want users to have different kinds of user roles (User/Moderator/Administrator). These roles would make certain API end points accessible or inaccessible based on user role. User roles would also shape the UI on Angular.
From my research it appears that I can utilize something called Application Roles on Azure AD, however I am lost as to how I would implement them.
I have the following questions -
- On which registered Azure AD app (API or Angular) should the Application Roles be defined?
- How would I access these roles - are they contained within the bearer token or do I need to make Microsoft Graph API calls to retrieve them?