How to get the current user account in Windows Active Directory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • andrestelnet
    New Member
    • Nov 2009
    • 1

    How to get the current user account in Windows Active Directory

    Hello everyone, I need to know, in C #, how to get the user that started the Windows account in Active Directory, to get its data. Thanks, I await your response.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Well you can probably use the System.Security .Principal.Wind owsIdentity.Get Current()
    object to start with, then look at its properties for information

    Comment

    • Minion
      Recognized Expert New Member
      • Dec 2007
      • 108

      #3
      If I'm not mistaken regardless of whether the computer is on a domain or stand alone security you should be able to use the following
      Code:
      Environment.CurrentUser

      Comment

      Working...