Checking if an Active Directory Group Exists using C# or VB .Net
With this function you can check if an Active Directory Group exists or not. Simply returns a boolean.
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 logged in.
The method is called passing the Group as a string. Three
things can then occur:
- If the Group exists and the method returns true.
- If the Group does not exist the
method returns false
- An Exception will be thrown for other errors
Where LdapConnection is an instance of LdapManager
public Boolean groupExists(String group)
There is no residual state the connection remains connected to the ADDS