
It is important to note that LDAP is a standard language used to query any kind of directory service. LDAP is a language for querying and modifying items within a directory service like AD database. First off, AD is a database-based system that provides authentication, directory, policy, and other services in a Microsoft Windows environment. You will find that the DirectoryEntry and DirectorySearcher objects are faster than the objects in the namespace.Ī few definitions are in order before we get into the actual code. The LDAP classes are much faster and allow you to get at almost all of AD, whereas the wrapper classes only allow you to get at Users, Groups, and Computer objects in AD. In this article, you will learn to use LDAP queries to retrieve information from your AD database.

Another approach is to use the complete set of class wrappers around AD under the namespace. One approach is to utilize the Lightweight Directory Access Protocol (LDAP) using the DirectoryEntry and DirectorySearch classes under the System.DirectoryServices namespace. There are a few different approaches you can use to retrieve information from your AD database within your domain.

NET applications need to interact with Microsoft Active Directory (AD) to authenticate users, get a list of users, retrieve groups, or determine which users are within which AD groups.
