Support
 
Phone Live Chat
 
Support
 
US: +1 888 720 9500
US: +1 800 443 6694
Intl: +1 925 924 9500
Aus: +1 800 631 268
UK: 0800 028 6590
CN: +86 400 660 8680

Direct Inward Dialing: +1 408 916 9393

 
 
 
 
 
Blog

What is LDAP? Understanding the LDAP protocol,
servers, ports, and how it works

Written by Andrew PrasannaActive Directory 3 min read

On this page
  • What LDAP is and why it's still relevant in 2025
  • History of LDAP
  • How LDAP works: Basic structure and terms
  • Workflow of LDAP authentication
  • Understanding key LDAP ports
  • Use cases: Why is LDAP still being used today?
  • LDAP vs Active Directory
  • FAQ

What LDAP is and why it's still relevant in 2025

The Lightweight Directory Access Protocol (LDAP) is a widely adopted open standard for accessing and maintaining information in a directory service like Active Directory (AD). A directory service is like an organized phone book for your network, storing information about users, devices, and resources. LDAP is the protocol that apps use to communicate with directory services, allowing them to authenticate users, authorize access, search for information, and manage directory data. Despite being around for decades, LDAP still remains relevant due to several key factors, like its support for centralized identity management; legacy system compatibility; and its open, vendor-neutral nature.

LDAP's evolution through the years

The timeline below highlights some important milestones in LDAP's development. Each event marks a step forward in features, security, and reliability, reflecting LDAP's growing role in directory services over the years.

An image showing the timeline of LDAP
Fig. 1: A brief timeline of LDAP.

How LDAP works: Basic structure and terms

LDAP works as a client-server model. The table below is a breakdown of the core LDAP terms and components that form the foundation of how directory services operate, enabling structured data storage, querying, and secure access in enterprise environments.

LDAP term Description
Client Any application that needs to query or modify information in the directory. Examples include OS login processes, email clients, web apps, VPN appliances, and SSO systems.
Server Also known as the Directory System Agent, the LDAP server stores directory information. It waits for the client requests, processes them, and returns responses.
Schema Defines rules and structure for entries in an LDAP directory, which includes attribute syntaxes, object classes, and matching rules that specify required attributes and data types for objects.
Operation types Core actions that clients perform in LDAP, such as Bind (authenticate), Search (find entries), Add, Delete, Modify, Modify DN (rename/move), Compare, Unbind (disconnect), Abandon (cancel operation), and Extended (miscellaneous or custom operations).
Distinguished name A distinguished name (DN) is a name that uniquely identifies an LDAP entry by specifying its full path in the directory tree. Each DN consists of one or more relative DNs, which are components like cn=John Doe or ou=Sales and form a hierarchical structure to the entry.
Filter Expressions used to find or match specific entries in the directory, using an attribute-value pair (e.g., (objectClass=person)).
URL Structured strings that point to LDAP resources and include information about the server, what to look for, and search conditions. They are used for queries, referrals, and connections.

Format: ldap[s]://host:port/base-dn?attributes?scope?filter.

Result code Numeric and named codes returned by LDAP after an operation to indicate status or errors (e.g., success, entry not found, or insufficient access). These codes clarify the success of or the nature of problems in directory operations.
Directory information tree A hierarchical tree structure where data is organized within an LDAP directory. Each node in the tree is called an entry, which has a DN that specifies the exact location in the directory information tree.
DNS SRV record DNS service (SRV) records are DNS entries that help clients automatically find and connect to LDAP servers (like locating LDAP on default port 389 or LDAPS on 636) by telling them which servers are available and how to reach them.

Workflow of LDAP authentication

Here's the typical process an application follows to authenticate and interact with LDAP.

  • An application (LDAP client) that needs access to directory information initiates a connection to the LDAP server.
  • Once connected, the client performs a bind operation, using credentials to authenticate.
  • The server verifies the credentials and, if successful, grants access.
  • After a successful bind, the client can:
    • Search the directory.
    • Add or modify data.
    • Delete entries.
    • Compare attributes.
  • The server processes each client request against its directory database and returns a response.
  • When finished, the client sends an unbind request, closing the connection.
An image showing how business applications use LDAP to manage their IT infrastructure
Fig. 2: An overview of how LDAP works.

Understanding key LDAP ports

LDAP also relies on specific ports for communication. Ensuring these are properly configured is crucial for reliable LDAP operations.

  • Port 389: The default port for unencrypted LDAP communication. Data is transmitted in plaintext, which means it can be intercepted and read.
  • Port 636: The default port for LDAPS—that is, LDAP over SSL/TLS. Communication is encrypted so directory data can be communicated securely.
  • Port 3268: Used to access the global catalog in AD for queries across multiple domains.
  • Port 3269: The encrypted version of the global catalog port.

Use cases: Why is LDAP still being used today?

Centralized user and group management

LDAP servers serve as the central repository for user accounts, passwords, group memberships, and other identity attributes. This centralizes user management and streamlines onboarding and offboarding.

Authentication and authorization

While SSO is achieved through SAML or OAuth, LDAP directories often serve as the back-end identity store that SSO solutions query to verify user credentials.

Legacy systems support

Because LDAP has been around for a long time, many enterprise systems were built with LDAP integration. Maintaining LDAP support helps these systems to keep running without needing expensive changes.

Open and vendor-neutral nature

LDAP benefits from a wide community of developers, admins, and researchers. This leads to continuous improvement and an abundance of online resources

LDAP vs Active Directory

LDAP and AD are closely related but are not the same.

  • AD is a directory service that is used to organize users, devices, and resources. AD, being a Microsoft product, is commonly used within a Windows environment.
  • LDAP is the open-standard protocol that AD and many other directory services use to structure queries and manage directory information.

Think of AD like a massive library that stores millions of books while LDAP is the versatile "card catalog" system or search engine you use to find those specific items within. In enterprise environments, it's common for both to be used together. LDAP is a core protocol that AD supports and helps clients query information. LDAP also helps AD integrate non-Microsoft apps, enabling you to communicate with them without maintaining separate databases.

Manage and report on AD objects with ADManager Plus

FAQ

1. What is the full form of LDAP?

LDAP stands for Lightweight Directory Access Protocol. It was designed to be a simplified and lightweight version of an earlier, heavier protocol called Directory Access Protocol (DAP), which was part of the X.500 directory service standard.

2. Is LDAP a database or server?

LDAP is neither a database nor a server but a protocol used to access and manage directory information. An LDAP server is the software that implements this protocol, like AD. These servers store data in a specialized directory, which is a hierarchical, database-like structure optimized for identity data and fast lookups.

3. What is LDAP authentication?

LDAP authentication is a process where an application (client) performs a bind operation to an LDAP server using a user's DN and password. The server verifies the credentials, and if successful, it establishes an authenticated session, allowing the client to perform authorized LDAP operations like search, add, modify, or delete.

 

ADManager Plus Trusted By

The one-stop solution to Active Directory Management and Reporting