Click here to Skip to main content
15,889,526 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

Can anybody suggest me,"How to get active directory domain current login user information using C#".

Thanks in Advance.

What I have tried:

I searched over internet, but couldn't found any relevant information.
Posted
Updated 17-May-16 1:21am

1 solution

Hi,

Please try to use this:

C#
System.Security.Principal.WindowsIdentity.GetCurrent().Name


Let me know if this works.

Thanks
 
Share this answer
 
Comments
Member 10714689 17-May-16 7:37am    
Hi, thanks for the reply, your code works for getting my domain joined system login info. but my requirement is I am working on a application, in this I will configure another AD domain. now with this application I need to access that domain current login user info. hope you understand.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900