single page application - Skip "login.windows.net" and redirect to federated ADFS -


any suggestion on how skip selection of login url (home realm?)

http://www.cloudidentity.com/blog/2014/11/17/skipping-the-home-realm-discovery-page-in-azure-ad/

in oauth2 , openid connect passing target domain in “domain_hint” parameter. in adal can pass via following:

authenticationresult ar =     ac.acquiretoken("https://developertenant.onmicrosoft.com/webuxplusapi",                     "71aefb3b-9218-4dea-91f2-8b23ce93f387",                     new uri("http://any"), promptbehavior.always,                      useridentifier.anyuser, "domain_hint=mydomain.com"); 

in owin middleware openid connect can same in redirecttoidentityprovider notification:

app.useopenidconnectauthentication(     new openidconnectauthenticationoptions     {         clientid = clientid,         authority = authority,         postlogoutredirecturi = postlogoutredirecturi,         notifications = new openidconnectauthenticationnotifications()         {             redirecttoidentityprovider = (context) =>              {                                                                         context.protocolmessage.domainhint = "mydomain.com";                  return task.fromresult(0);              },          }     }); 

finally, in ws-fed following:

app.usewsfederationauthentication(    new wsfederationauthenticationoptions    {       notifications = new wsfederationauthenticationnotifications       {          redirecttoidentityprovider = (context) =>          {             context.protocolmessage.whr = "mydomain.com";             return task.fromresult(0);          }       }    } } 

so, if using adal js, add adal init:

extraqueryparameter: 'domain_hint=yourcompany.com'  

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -