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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -