Getting the Windows User Name in ASP .NET Core
If you want to get a users username in a site that uses authentication then you can just use the User object and that will provide all claims associated with that user. However if you want to get the username for a user where they’re not required to authenticate first Read more…