Getting a all list of Active Directory users using C# or VB .Net

The LdapUser object can be updated via properties and methods

Langauges Supported

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

Method: GetUserList

Parameters:  none


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


The method is called without parameters.

  1. A string array of usernames is returned.
  2. An Exception will be thrown for other errors


Where LdapConnection is an instance of LdapManager

        public String[] GetUserList()
                return LdapConnection.GetUserList();
            catch (Exception)

Post Condition

The String array is returned the AD connection remains connected.