# Authentication with MS ADAL getting error for using version 2

**URL:** <https://forum.ionicframework.com/t/authentication-with-ms-adal-getting-error-for-using-version-2/164648>\
**Category:** ionic-v3\
**Created:** [May 24, 2019, 7:24am UTC](https://forum.ionicframework.com/t/authentication-with-ms-adal-getting-error-for-using-version-2/164648 "2019-05-24T07:24:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganeshweb91](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@ganeshweb91](https://forum.ionicframework.com/u/ganeshweb91)\
**Post date:** [May 24, 2019, 7:24am UTC](https://forum.ionicframework.com/t/authentication-with-ms-adal-getting-error-for-using-version-2/164648/1 "2019-05-24T07:24:06Z")

</div>

I’m using **MS ADAL** for login authentication in **ionic 3**. getting error :

 ![ms%20adl](https://global.discourse-cdn.com/ionicframework/original/3X/4/5/452526485f6c0b49aaf359df5afdf902dc250fa2.png)

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](https://login.windows.net/common)’);  
> authContext.acquireTokenAsync(‘[https://graph.windows.net](https://graph.windows.net)’, ‘4324dsad-b5c3’, ‘[http://localhost:8000](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));

what i need to change ?
