简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM