4

We have a situation where we have been merged with another organisation and as part of that our sid history has been migrated to the new common active directory.

However, our understanding was that as part of the sid history migration when we use this method httpcontext.current.identity.name It would return the old domain name even though you have logged onto the pc with the new domain name because of the sid history

We are using internet explorer and the credentials returned are for the new domain e.g. instead of abc\d (old domain), its returning def\d (new domain).

Is there anything we have done incorrecly here or can do something to fix this? We are using IIS Windows Authentication on IIS 10 with Windows Server 2016.

We have been using the Quest Migration tool.

Can we enable something rather than change the code?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Baahubali
  • 4,604
  • 6
  • 33
  • 72
  • This question is unclear. Can you explain what you are trying to do? – HackSlash Nov 21 '18 at 17:13
  • We have applications which expects abc\username but because the user is now migrated over to the new domain, the code i mentioned is now returning def\username. is there a way through sidhistory or other means to return abc\username? – Baahubali Nov 22 '18 at 01:19

1 Answers1

1

The command httpcontext.current.identity.name is based on authentication. In your case, Windows authentication. That means it will show who is currently logged in. Not who was logged in the past at some arbitrary point in history.

SOURCE: https://learn.microsoft.com/en-us/dotnet/api/system.web.httpcontext.user?redirectedfrom=MSDN&view=netframework-4.7.2#System_Web_HttpContext_User

SEE ALSO: How does HttpContext.Current.User.Identity.Name know which usernames exist?

HackSlash
  • 4,944
  • 2
  • 18
  • 44