.NET Active Directory Wrapper    
Access Active Directory From Your C# or VB .Net Code

Retrieving an Active Directory Group Object using C# or VB .Net

This method returns a single Group object from Active Directory which can then be manipulated and updated.

Method: GetGroup

Parameters:  (string) Group

Programming Languages Supported

ASP.NET, C#, VB.Net, Visual Studio 2010, Visual Sutdio 2012


An instance of the LDAP manager must be instantiated for a valid ADDS server and be logged in.


The method is called passing the Group as a string. Three things can then occur:

  1. If the Group exists the method returns an LdapGroup object.
  2. If the Group does not exist the method returns a null object
  3. An Exception will be thrown for other errors


Where LdapConnection is an instance of LdapManager

public LdapGroup GetGroup(String group)
                return LdapConnection.GetGroup(group);
            catch (Exception)


Post Condition

The Group object contains an updatable collection of User objects