I am trying to emit Roles in Angular Application using below instruction.
https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-angular
I was successfully validating user, getting roles in general from the account claims and also able to retrieve the JWT Token silently, everything using MSAL Service.
But, trying to achieve the same in JWT Token. accrue token silently but its missing roles. Just wonders, if someone can help me, how to configure it in Azure AD.
In Angular, I have this code which gives me JWT Token. while decoding it.. I am not seeing application roles in it.
const requestObj = {
scopes: ['user.read'],
};
this.authService.acquireTokenSilent(requestObj).then(function (tokenResponse) {
// Callback code here
console.log(tokenResponse.accessToken);
})
.catch(function (error) {
console.log(error);
});