active directory - Getting the logged in user info from ADAL on android -
i working adal https://github.com/azure-samples/active-directory-android
my code mimics sample close
mauthcontext.acquiretoken(todoactivity.this, constants.resource_id, constants.client_id, constants.redirect_url, constants.user_hint, new authenticationcallback<authenticationresult>() { @override public void onerror(exception exc) { if (mloginprogressdialog.isshowing()) { mloginprogressdialog.dismiss(); } toast.maketext(getapplicationcontext(), tag + "gettoken error:" + exc.getmessage(), toast.length_short) .show(); navigatetologout(); } @override public void onsuccess(authenticationresult result) { if (mloginprogressdialog.isshowing()) { mloginprogressdialog.dismiss(); } if (result != null && !result.getaccesstoken().isempty()) { setlocaltoken(result); sendrequest(); } else { navigatetologout(); } } });
i pass in user's email address, if user changes , uses different 1 adal library on onsuccess never tells me user changed it. authenticationresult has field calls muserinfo that should contain user's first name/last name email etc.
but me every successful login muserinfo=null.
anyone know how adal return populated muserinfo object?
thanks tom
userinfo constructed id_token retuned server. in case of adfs blue (3.0), not return id_token , hence cannot know user signed in @ idp. adfs threshold supports id_token if can upgrade.
Comments
Post a Comment