'MSAL - How to get ID token using Angular 13 compatible MSAL Library

We are using "MSAL Angular 13" compatible library for Azure AD Authentication. By Default, it passes Access Token.

In my project, we need to pass ID Token not Access token. How to get ID Token? MSAL has one service but there is no methods like "Acquired"IDTone", the way we have 3 methods for getting Access tokens.

We just got a link for ID token but the same is through java script. We will try and see, if something can be done(Not seen the details).

Any pointers would be very heplful.

thanks and best regards



Solution 1:[1]

Try the idToken property of the authResponse object.

https://azuread.github.io/microsoft-authentication-library-for-js/docs/msal/modules/_authresponse_.html

All acquireToken() methods return an id_token.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jas Suri - MSFT