Getting current login from Active Directory using C# code

前端 未结 5 1233
不思量自难忘°
不思量自难忘° 2020-12-23 23:08

How can I get the current user\'s login name from Windows Active Directory using C# code?

5条回答
  •  别那么骄傲
    2020-12-23 23:36

    System.DirectoryServices.AccountManagement.UserPrincipal.Current.Name
    

    This is also working for me! Thanks

提交回复
热议问题