LDAP vs. Active Directory: What’s the Difference?
Windows Server · Active Directory · LDAP

LDAP vs. Active Directory: What’s the Difference?

Understand what LDAP is, what Active Directory does, how they work together, and why LDAP is an important protocol for Windows Server administrators.

A practical learning note for Windows Server administrators

Are LDAP and Active Directory the same thing?

No. This is a common point of confusion when learning Active Directory. LDAP is a protocol used to communicate with directory services. Active Directory Domain Services (AD DS) is Microsoft’s directory service, which stores and manages information about users, computers, groups and other network objects.

📖

1. What is LDAP?

Lightweight Directory Access Protocol.

LDAP (Lightweight Directory Access Protocol) is an open protocol used to access and manage information stored in a directory service.

A directory is a structured collection of information. It can contain details about users, groups, computers, devices, organizations and other resources.

LDAP defines how a client communicates with a directory server. It allows applications to search for entries, read their attributes and, when authorized, add, modify or delete directory information.

What can LDAP be used for?

🔎

Search directory information

Find users, groups, computers and other entries based on their attributes.

👤

Read user attributes

Retrieve information such as usernames, email addresses, department and phone numbers.

✏️

Modify directory entries

Update attributes or other directory information when the account has sufficient permissions.

🔐

Authenticate through a bind

A client can use an LDAP Bind operation to establish an authenticated LDAP session, depending on the authentication method.

LDAP is not a directory database LDAP defines the communication protocol. The directory service itself stores the data and decides how entries are organized and managed.
⚖️

3. LDAP vs. Active Directory

Different technologies with different responsibilities.
Feature LDAP Active Directory (AD DS)
What is it? A communication protocol. A directory service.
Purpose Defines how clients access directory information. Stores and manages directory information and identities.
Vendor An open standard. Microsoft technology.
Stores directory data? No, not by itself. Yes.
Can search directory entries? Yes, through LDAP operations. Yes, it supports LDAP queries.
Authentication Supports LDAP Bind methods. Supports Kerberos and other authentication mechanisms, and LDAP Bind for LDAP connections.
Group Policy Does not provide Group Policy. Supports Group Policy.
Replication Does not define AD replication. Provides directory replication between Domain Controllers.
Think of it this way LDAP is the language a client can use to communicate with a directory. Active Directory is one of the directory services that understands that language.
🗂️

4. How does Active Directory organize information?

A hierarchical structure of objects and attributes.

Active Directory stores information in a hierarchical directory structure. The objects in the directory have attributes that describe them.

For example, a user object can contain attributes such as:

  • Common name (CN)
  • Username (sAMAccountName)
  • Email address (mail)
  • Department (department)
  • Display name (displayName)

Example Active Directory structure

🌐 DC=example,DC=com
📁 OU=Users
👤 CN=John Smith
👤 CN=Jane Doe
📁 OU=Computers
💻 CN=PC-001
💻 CN=PC-002
📁 OU=Groups
👥 CN=IT Administrators

This is a simplified example of how directory objects can be organized. The actual structure depends on how an administrator designs the Active Directory environment.

What is a Distinguished Name (DN)?

In LDAP, an entry can be identified using a Distinguished Name (DN). The DN describes the entry’s location in the directory hierarchy.

CN=John Smith,OU=Users,DC=example,DC=com

Breaking this down:

Component Meaning
CN=John SmithCommon Name: the name of the directory object.
OU=UsersOrganizational Unit containing the object.
DC=exampleDomain Component: first part of the DNS domain.
DC=comDomain Component: second part of the DNS domain.

The DN is useful when searching for, identifying or modifying a particular directory object.

🔄

5. How does LDAP communicate with Active Directory?

A practical example of an LDAP query.

Imagine an application that needs to find a user in an Active Directory domain. Instead of accessing the directory database directly, the application can communicate with a Domain Controller using LDAP.

  1. The application connects to a Domain Controller. It uses the Domain Controller’s hostname or IP address and an LDAP port.
  2. The application establishes an LDAP session. It can use an appropriate Bind method to authenticate, or use an anonymous connection if the directory permits it.
  3. The application performs a search. It specifies a search base, scope and filter to find the required directory entries.
  4. Active Directory processes the request. The Domain Controller checks the request and the permissions of the connection.
  5. The application receives the result. The response contains the requested entries and attributes that the connection is allowed to read.

Example LDAP search filter

(sAMAccountName=john.smith)

This filter searches for an entry whose sAMAccountName attribute matches john.smith.

Example search base

DC=example,DC=com

The search base specifies where in the directory tree the search should begin. The search scope determines whether the query checks just that entry, its immediate children or the full subtree.

LDAP queries do not automatically grant access Active Directory applies permissions to directory objects and attributes. An LDAP client can only read or modify information that its security context is authorized to access.
🔐

6. LDAP authentication vs. Windows domain logon

An important distinction for troubleshooting.

LDAP supports an operation called Bind. A client uses Bind to establish an LDAP session and, depending on the method, authenticate to the directory.

However, this does not mean that every Windows domain logon uses LDAP as its authentication protocol.

LDAP Bind

Used by an LDAP client to establish an authenticated connection to a directory service. It can use different authentication mechanisms.

Kerberos

Commonly used by Windows domain-joined clients for domain authentication and obtaining tickets to access network services.

Active Directory supports several authentication mechanisms. Kerberos is the normal choice for many Windows domain authentication scenarios, while LDAP Bind is relevant when an application or client connects to the directory using LDAP.

Example A Windows user signs in to a domain-joined computer. Kerberos is commonly involved in domain authentication. An application might separately use LDAP to search Active Directory for the user’s department or group membership.

LDAP can also be used to query group membership, but the application must still respect the security context and permissions involved.

🔌

7. Important LDAP ports

Know the difference between LDAP, LDAPS and Global Catalog.
Port Protocol / Service Purpose
389 LDAP Standard LDAP connections. TCP is commonly used for LDAP sessions; UDP is also used for connectionless LDAP operations such as DC Locator discovery.
636 LDAPS LDAP over a TLS-protected connection, commonly called LDAPS.
3268 Global Catalog LDAP access to the Global Catalog over a standard connection.
3269 Secure Global Catalog LDAP access to the Global Catalog over a TLS-protected connection.

What is LDAPS?

LDAPS is LDAP over a TLS-protected connection. It protects LDAP traffic in transit between the client and the directory server.

For a typical LDAPS connection, the Domain Controller needs a suitable server certificate. The client must also trust the certificate chain and validate the server identity.

Security best practice Avoid sending simple LDAP Bind credentials over an unencrypted connection. Use properly configured TLS protection, such as LDAPS or StartTLS where supported, and follow Microsoft’s LDAP signing and channel-binding security guidance.

LDAP vs. LDAPS

LDAP – Port 389

Standard LDAP connection. It does not automatically mean that the entire connection is encrypted.

LDAPS – Port 636

TLS is negotiated when the connection is established, protecting the LDAP traffic in transit.

💻

8. Useful PowerShell commands

Work with Active Directory and inspect directory information.

PowerShell provides useful commands for working with Active Directory. Many of the following examples use the ActiveDirectory module, which is commonly installed through RSAT on supported Windows systems.

Import the Active Directory module

Import-Module ActiveDirectory

Find a user account

Get-ADUser -Identity jsmith

Retrieves an Active Directory user account by its identity.

Retrieve selected user attributes

Get-ADUser -Identity jsmith -Properties Department,Mail,Title |
    Select-Object Name,SamAccountName,Department,Mail,Title

Retrieves additional attributes and displays selected properties.

Search for users

Get-ADUser -Filter 'Department -eq "IT"' |
    Select-Object Name,SamAccountName,Department

Returns users whose Department attribute is set to IT.

Find a user’s Distinguished Name

Get-ADUser -Identity jsmith |
    Select-Object DistinguishedName

Find the current domain information

Get-ADDomain

Specify a Domain Controller

Get-ADUser -Identity jsmith -Server dc01.example.com

Directs the Active Directory cmdlet to a specific Domain Controller.

Important PowerShell distinction The ActiveDirectory module is useful for administering AD DS, but its cmdlets commonly communicate through Active Directory Web Services (ADWS), rather than being simple examples of raw LDAP commands. ADWS normally uses TCP port 9389. This is why using Get-ADUser is not the same as demonstrating an LDAP Bind or LDAP Search.
🧰

9. Useful tools for LDAP troubleshooting

Tools to inspect and test directory connections.
🔍

LDP.exe

A Windows graphical utility for connecting to LDAP servers, performing Bind operations, browsing directory entries and running searches.

🖥️

Active Directory Users and Computers

A graphical administration tool for managing users, groups, computers and Organizational Units.

⌨️

PowerShell ActiveDirectory module

Provides cmdlets such as Get-ADUser, Get-ADGroup and Get-ADComputer for directory administration.

🌐

Wireshark

Can help inspect network traffic and identify LDAP connections, connection failures and TLS negotiation issues.

Test whether an LDAP port is reachable

Test-NetConnection dc01.example.com -Port 389

For an LDAPS connectivity check:

Test-NetConnection dc01.example.com -Port 636

These commands test TCP connectivity to the specified ports. They do not prove that LDAP authentication, certificate validation or a directory search will succeed.

Do not confuse connectivity with a successful LDAP operation A successful TCP connection only confirms that a connection to that port could be established. You still need to verify the LDAP session, authentication method, certificate trust where applicable, and permissions.
📝

10. Quick revision: 10 key takeaways

The main points to remember.
  1. LDAP stands for Lightweight Directory Access Protocol.
  2. LDAP is a protocol, not a directory service or database.
  3. Active Directory Domain Services is Microsoft’s directory service.
  4. Active Directory supports LDAP for accessing directory information.
  5. LDAP can search, read and modify directory entries when authorized.
  6. A Distinguished Name identifies an entry in the directory hierarchy.
  7. LDAP Bind establishes an LDAP session and can authenticate a client.
  8. Windows domain authentication commonly uses Kerberos, not LDAP as the primary logon protocol.
  9. LDAP commonly uses port 389; LDAPS commonly uses port 636.
  10. PowerShell, LDP.exe and network tools can help troubleshoot directory access.
🔗

11. Official documentation and further reading

Microsoft documentation used to support this article.
✍️

About this article

Attribution and editorial note.

This article is an independently written learning guide about LDAP and Active Directory. ChatGPT was used as an AI-assisted drafting and formatting tool. Technical explanations were checked against the Microsoft documentation linked above.

Examples use example.com as a placeholder domain. Replace it with your own Active Directory DNS domain when testing commands. Always validate changes in an appropriate test environment before applying them in production.

© 2026 · Windows Server & Active Directory learning notes

Designed as a responsive, standalone HTML page. The styles are included in this file; no external CSS framework or JavaScript library is required.

Thanks 2 ChatGPT and Google <3 keep the vibes high

Geef een reactie