azure-activedirectory-library-for-cordova
azure-activedirectory-library-for-cordova copied to clipboard
(ADAL) integration with ionic getting “We are unable to issue tokens” , need to use v 2.0
I’m using MS ADAL for login authentication in ionic 3. Login screen appearing , when i'm login, its sending issue, getting error : We are unable to issue tokens from this API version for microsoft account… use version 2.0 of the protocol to support this.
my code:
let authContext: AuthenticationContext = this.msAdal.createAuthenticationContext(‘https://login.windows.net/common’);
authContext.acquireTokenAsync(‘https://graph.windows.net’, ‘4324dsad-b5c3’, ‘http://localhost:8000’,"","")
.then((authResponse: AuthenticationResult) => {
console.log(‘Token is’ , authResponse.accessToken);
console.log(‘Token will expire on’, authResponse.expiresOn);
})
.catch((e: any) => console.log(‘Authentication failed’, e));
Are you perhaps using a personal account to sign in? If so: that will not work. ADAL does not support b2c. You would need MSAL (which is sort of v2 of ADAL)