Azure AD authentication issue in cordova plugin -


i following sample add authentication cordova app here: https://github.com/azure-samples/active-directory-cordova-multitarget

i have registered tenant , set permissions. have following line retrieve access token:

authcontext.acquiretokenasync('https://graph.windows.net', 'myappid', 'http://myappnamehere')     .then(function(authresult) {         // success handler         alert(authresult.userinfo);     }); 

when run app redirected microsoft login page , authenticate. redirects me app page , displays null on alert. inspected authresult , statuscode property 'failed' , accesstoken null. there no other information given me figure out problem was.

i modified source code plugin return few more properties including 'errorloginfo' property returning following message:

errorcode: invalid_grant user or administrator has not consented use application id 'myappid'. send interactive authorization request user , resource.

i running sample off of msdn azure account , logging in owner of azure account. when run same sample using user created on tenant works successfully.

  • why sample work random user created in tenant not administrator account?
  • how 'send interactive authorization request' says in error message?

is administrator microsoft account (e.g. liveid)? if that's case, won't able use /common endpoint. if use tenant domain instead of /common in authority url you'll see admin able token successfully.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -