locked
Home realm parameter RRS feed

  • Question

  • I am using the following code in my WIF single sign on scenario:

    privatevoidWSFederationAuthenticationModule_RedirectingToIdentityProvider(objectsender, RedirectingToIdentityProviderEventArgse)    

            {           

    if(Request.QueryString.AllKeys.Any(k => k == "whr"))

                {

                    e.SignInRequestMessage.HomeRealm = Request[

    "whr"];               

                }

            }

    I can see that the whr parameter is getting passed to login.windows.net but it isn't making it to login.microsoftonline.com. Does anyone know why it would be getting lost?

    Monday, March 10, 2014 1:15 PM

Answers

  • Hi Paul,

    It would be great to go into this with more detail, but I believe the following may help if i understand your question correctly:

    Set the parameter for “login_hint” or “username” to achieve this.

                signInRequest.SetParameter("wtrealm", IdentityConfig.Realm ?? config.Realm);

    http://msdn.microsoft.com/en-us/library/cc236491.aspx

    • login_hint (optional): This value is a string that is used to provide a hint about the login identifier the end-user might use to log in.
    • username (optional): This value is a string that is used to provide a hint about the login identifier the end-user might use to log in.

    Note:- login_hint and username are aliases that signify the same query parameter and either of these query parameters can be used to provide a hint about the login identifier the end-user might use to log in.

    Thanks,

    James.

    Tuesday, July 15, 2014 10:31 PM