12

I have an ASP.NET Core 3.0 application that works with local Intranet Windows Authentication to identify logged in users. Using the standard Windows Authentication behaviors I'm able to capture the user's WindowsIdentity without an issue.

However, depending on how the user is logged into the browser using either automatic Intranet Browser login (ie. no password dialog) or explicitly logging in using the browser Password dialog box, I get different results for the user's groups.

The following is an API request that echos back user information including a filtered group membership list (that excludes built-in accounts). The one on the left is a manual login, the one on the right an auto-login.

For the explicit login I correctly see all the custom groups the user is part of. However, for the auto-login, those same groups do not show up:

group differences for manual vs. auto login

I also took a close look at the User and Identity instances on the server, and it's referencing the exact same SIDs for the user, so it seems strange that different results are being returned for the Group Membership.

Any ideas why the group list is different when I am getting the same account returned? Note the groups are local so it shouldn't be an issue due to domain access.

Note: I'm testing locally on localhost even, and to test this I set the Windows Proxy Settings here:

Login configuration

With the checkboxes off I'm forced to login. With them on (in Chromium browsers anyway) I have to explicitly enter my credentials into the browser's login dialog.

1 Answer 1

9

Has the user logged out of their computer since being added to those groups?

The groups listed are held in the user's login token. I think what might be happening is that auto-login sends the user's existing login token (created when they logged into Windows), so it would not contain any groups that they've been added to since they last logged in.

Manually entering the username and password performs a new login, and thus gets a brand new token with all the groups at the time of the login. So new groups will show up there.

1
  • 1
    After some additional check it turns out that you are absolutely correct. Initially I thought I had rebooted the machine since the issues showed, but after actually forcing a log off and log on I did find that the indeed after logging in again I was able to see the groups. Thanks - so obvious in retrospect yet still so easy to miss. Oct 14, 2019 at 4:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.