LDAP

An open protocol for querying and modifying directory services (users, groups) over IP networks.

IETF RFC 4511 (LDAPv3)Used by Active Directory, OpenLDAPCross-Platform (Windows, Linux, Unix)

What is LDAP?

LDAP (Lightweight Directory Access Protocol) is an open, cross-platform protocol for querying and modifying directory services over IP networks.

LDAP directory structure:

  • Entries: Objects like users, groups, computers (each has a Distinguished Name - DN)
  • Attributes: Properties of entries (cn=John Doe, mail=john@company.com)
  • Tree structure: Hierarchical (dc=com, dc=company, ou=Sales, cn=John Doe)

LDAP operations:

  • Bind: Authenticate to the directory (login)
  • Search: Query entries (find all users in Sales)"
  • "Add/Modify/Delete: Create, update, delete entries"
  • "Compare: Check if attribute has specific value"

Analogy

Think of LDAP like a phone book lookup service. You ask 'find all users in Sales department' (LDAP query) and it returns the list. LDAP is the protocol that lets applications talk to directory services (like Active Directory) to lookup, create, and modify users.

Types and Use Cases

  • "Active Directory Integration: Authenticate users against AD via LDAP"
  • "OpenLDAP: Open-source directory service using LDAP (Linux/Unix)"
  • "User Provisioning: Bulk import/create users via LDAP queries"
  • "Attribute Sync: Sync user attributes (department, email) between systems"

How it Works

1
Application connects to LDAP server (Active Directory, OpenLDAP) on port 389 (or 636 for LDAPS)
2
Application binds (authenticates) with service account credentials
3
Application performs search: 'find all users where department=Sales'
4
LDAP server returns matching entries (DNs, attributes)
5
Application processes results (display users, sync to another system)
terminal
# LDAP Search Query Example
ldapsearch -x -H ldaps://ad.company.com:636 \
  -D "cn=service-account,ou=ServiceAccounts,dc=company,dc=com" \
  -w "service-password" \
  -b "dc=company,dc=com" \
  "(department=Sales)" \
  cn mail memberOf

# Result
dn: cn=John Doe,ou=Sales,dc=company,dc=com
cn: John Doe
mail: john@company.com
memberOf: cn=Sales,ou=Groups,dc=company,dc=com

# LDAP Add User (LDIF Format)
dn: cn=Jane Smith,ou=Sales,dc=company,dc=com
objectClass: user
cn: Jane Smith
sAMAccountName: jane
mail: jane@company.com

LDAP vs Active Directory

LDAP
Active Directory
✓

LDAP is a protocol for accessing directories

✗

Active Directory is a directory service product (Microsoft)

✓

LDAP can access AD, OpenLDAP, or other directories

✗

AD implements LDAP (among other protocols)

✓

LDAP is cross-platform

✗

AD is Windows-centric (though can be accessed via LDAP from other platforms)

Best Practices for LDAP

  • "Use LDAPS (port 636): Always encrypt LDAP traffic (plain LDAP on 389 is insecure)"
  • "Service accounts: Use dedicated service accounts for LDAP binds (not admin accounts)"
  • "Limit search scope: Narrow the search base DN to improve performance"

How LoginRadius Powers LDAP

LoginRadius CIAM platform integrates with LDAP directories (Active Directory, OpenLDAP) via our LDAP connector. We support LDAPS (secure encrypted connections), service account authentication, user sync from LDAP to LoginRadius, and group-to-role mapping. Our platform provides step-by-step LDAP configuration guides, connection testing tools, and detailed LDAP operation logs for troubleshooting and compliance.

FAQs

LDAP is a protocol (language) for talking to directory services. Active Directory is Microsoft's directory service product that implements LDAP (among other protocols like Kerberos). Think of LDAP as HTTP and AD as a web server - HTTP is the protocol, web server is the implementation.

SCIM is modern, REST-based, easier to implement (JSON/HTTPS). LDAP is legacy, complex, but widely supported by on-prem systems. For cloud/SaaS, use SCIM. For on-prem AD, LDAP may be necessary. Ideally, use SCIM for modern systems, LDAP for legacy AD integration.

LoginRadius provides LDAP integration: (1) LDAP Connector - authenticate users against on-prem AD/LDAP directories, (2) LDAPS support - secure encrypted connections (port 636), (3) Service account auth - dedicated service accounts for LDAP binds, (4) User sync - periodically sync LDAP users to LoginRadius via queries, (5) Group mapping - map LDAP groups to LoginRadius roles.

Customer Identity, Simplified.

No Complexity. No Limits.
Thousands of businesses trust LoginRadius for reliable customer identity. Easy to integrate, effortless to scale.

See how simple identity management can be. Start today!