Monthly Archives: February 2006

Origami

Helping the viral marketing around project origami: http://www.origamiproject.com/1/

How to retreive ActiveDirectory information for a username

Here is a little snippet to read some basic AD user info with C#. The UserADInfo class is a simple three property class. using System.DirectoryServices;UserADInfo info = new UserADInfo();DirectoryEntry entry = new DirectoryEntry(“LDAP://mydomain”);// Filter the domain out of the useraccountString account = userAccount.Replace(@”mydomain”, “”);try { DirectorySearcher search = new DirectorySearcher(entry); entry.Username = “mydomainuser”; // someoneā€¦ Read More »