Hello,
After you have mapped roles to a user, you can query the Graph API for the user and then query the Graph API for roles associated with that user. You can store the roles in the web.config
Then you can check for memberOf to get the directory roles:
const options = {
authProvider,
};
const client = Client.init(options);
let res = await client.api('/me/memberOf')
.get();
Reference:
https://docs.microsoft.com/en-us/graph/api/user-list-memberof?view=graph-rest-1.0&tabs=javascript
See the answer to this question on Stackoverflow: https://stackoverflow.com/questions/50579651/how-to-get-current-user-roles-with-adal-js
Please take a moment to "Mark as Answer" and/or "Vote as Helpful" wherever applicable. Thanks!