In my project i want to authenticate the user using Azure. So i'm used MS Adal ionic native in my project.
refered this site. https://ionicframework.com/docs/native/ms-adal/
I followed all steps properly.Here what iam tried.
My Component File
- import { MSAdal, AuthenticationContext, AuthenticationResult } from '@ionic-
- native/ms-adal';
- export class AppComponent{
- constructor(private msAdal: MSAdal,platform: ) {
- let authContext: AuthenticationContext= this.msAdal.createAuthenticationContext('https://login.windows.net/common');
- authContext.acquireTokenAsync('https://graph.windows.net', '13212131232232', '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));
- });
- }
- }
Iam always facing this error only.

I searched lot of thing. None of them useful to solve this problem. So kindly help me to solve this problem. If any help warmly appreciated.


Nanddeep NachanRank #38 · 35.2K reputationPosted Jul 4, 2018, 9:14 PM EDT
Muthu KumarRank #935 · 2.2K reputationPosted Jul 4, 2018, 9:27 PM EDT
mohan reddy7 reputationPosted Aug 30, 2018, 2:38 AM EDT