Search code examples
azureazure-active-directoryaccess-tokenazure-ad-msal

How to read ID Token using MSAL


I successfully acquire an ID Token along with an Access Token from Azure AD using MSAL.js in my Angular application.

The ID Token does contain information about the signed-in user. This would include roles and groups. However I do not understand how to read these values from the token stored in local storage. Does MSAL provide utilities to do so ?


Solution

  • In the more recent versions of the code it looks like there is a getAccount() function.

     this.authService.getAccount()