single-sign-onidentityserver4owinidentityserver3

Identity server 3 Windows authentication not working with current user


In my mvc app integrated with identity server 3 with windows login. When i use that login with windows option its asking credentials popup (I attached screen shot.)

when i close the browser and reopen it again its asking. My windows session is not persistence.

  1. My Expected behaviour it should take my current system user session automatically.I am using windows server 2016 OS.

My code :enter image description here

var metadataAddress = config.FederatedAuthenticationMetaAddress;
            var manager = new SyncConfigurationManager(new ConfigurationManager<WsFederationConfiguration>(metadataAddress));
           
            var wsFederation = new WsFederationAuthenticationOptions
            {
                AuthenticationType = "windows",
                Caption = "Windows",
                SignInAsAuthenticationType = signInAsType,
                  ConfigurationManager = manager,
                Wtrealm = "urn:idsrv3"
            };

   app.UseWsFederationAuthentication(wsFederation);
   

Solution

  • it is the behavior of a window due to the settings can be changed from internet options

    to change it go for internet options--> security tab --> custom level--> scroll down and chose what fits for you like that : enter image description here

    and even you can force an option by AD group policy that what I did sot it greyed out for users

    to do it through group policy :

    open group policy management from your active directory and make a gpo and then edit and do the following :

    The policy value for Computer Configuration -> Administrative Templates -> Windows Components -> Internet Explorer -> Internet Control Panel -> Security Page -> Internet Zone -> "Logon options"