Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Synchronize LDAP/Active Directory data to Drupal content entities (nodes, taxonomy terms) with flexible field mapping, automated scheduling, and smart deduplication.

Features

LDAP Entity Sync imports organizational data from LDAP or Active Directory servers into Drupal content entities. Unlike authentication-focused LDAP modules, this creates and maintains actual Drupal content like employee profiles, department pages, or contact directories.

Basic Functionality:

  • Map LDAP attributes to any Drupal field type with visual configuration interface
  • Prevent duplicates using configurable deduplication fields (email, unique ID, etc.)
  • Update existing entities or create new ones based on LDAP data
  • Schedule automatic synchronization via cron (hourly, daily, weekly)
  • Run manual syncs with dry-run mode to preview changes

Unique Features:

  • Discovery Tools: Browse LDAP organizational units, inspect attributes, and preview filters before configuring
  • Field Transformations: Convert LDAP data with 15+ transforms including taxonomy term creation, user lookups, binary image downloads, and DN parsing
  • Smart Deletion: Choose between safe (never delete), tracked (delete only synced entities), or strict (delete missing) modes
  • Per-Bundle Config: Independent sync settings for each content type via dedicated UI forms
  • Built-in LDAP Client: No external module dependencies for LDAP connectivity

Use Cases:

  • Automatically maintain employee directory from HR Active Directory
  • Sync department/team pages from organizational units
  • Keep contact information current with corporate directory
  • Create content representing users/groups for workflows

When to Use:
Use this module when you need to create Drupal content entities from LDAP (not just user authentication), want automated ongoing synchronization, and need field-level transformation capabilities.

Post-Installation

After enabling the module:

1. Configure LDAP Connection
Go to Configuration → Services → LDAP Entity Sync (/admin/config/services/ldap-entity-sync) and enter:

  • LDAP server URL and port
  • Base DN (e.g., DC=company,DC=com)
  • Bind credentials (stored via Key module)
  • Test the connection

2. Explore Your Directory (Optional)
Use Discovery Tools to browse organizational units, inspect available attributes, and test LDAP filters.

3. Configure Content Type Sync
Go to Structure → Content types → [Your Type] → LDAP Sync and:

  • Enable synchronization
  • Choose LDAP filter preset or write custom filter
  • Map Drupal fields to LDAP attributes
  • Select field transformations if needed
  • Set deduplication field (typically email)
  • Choose deletion mode and sync frequency

4. Run First Sync
Test with dry run: drush ldap-sync:run node:employee --dry-run
Then run actual sync: drush ldap-sync:run node:employee

5. Monitor
View sync status at Reports → LDAP Sync Status

Special Considerations:

  • Use LDAPS (port 636) for secure connections
  • Start with batch size 50-100 for performance
  • Enable "Auto-create taxonomy terms" for reference fields
  • Grant "Administer LDAP entity synchronization" permission to admins

Similar projects

Lightweight Directory Access Protocol (LDAP) (https://www.drupal.org/project/ldap)

  • Purpose: User authentication, authorization, and provisioning for Drupal user accounts
  • Focus: Managing Drupal's user entity (login credentials, roles, authentication)
  • Key Difference: LDAP module authenticates users. LDAP Entity Sync creates content entities (nodes, taxonomy terms) from directory data. Use both together: LDAP for login, LDAP Entity Sync for content like employee profiles or department pages
  • Independence: LDAP Entity Sync has its own LDAP connection service and does not require the LDAP module
Supporting organizations: 

Project information