passbolt/passbolt_api · error
The ldap integration is not configured or it is disabled
Error message
The ldap integration is not configured or it is disabled
What it means
DirectorySyncCommand checks the LDAP (directory sync) organization settings at startup; if DirectoryOrgSettings reports the integration as disabled or unconfigured, it prints 'The ldap integration is not configured or it is disabled' plus a hint URL and aborts. This is a deliberate guard: directory synchronization cannot run without LDAP settings enabled in the admin UI.
Solutions
- Open the hinted URL /app/administration/users-directory and configure + enable the LDAP directory.
- Verify ldap org settings exist in the database (organization_settings table, property 'ldap').
- Confirm the ldap PHP extension is installed (a preceding check aborts otherwise).
- Re-run `passbolt directory_sync` after saving valid settings.
- Use the LDAP test connection endpoint/command to validate credentials and server reachability first.
Example fix
// before
$io->err(__('The ldap integration is not configured or it is disabled'));
// after
$io->err(__('The ldap integration is not configured or it is disabled. Configure it at: ' . Router::url('/app/administration/users-directory', true))); Defensive patterns
Strategy: validation
Validate before calling
$settings = \Passbolt\DirectorySync\Utility\DirectoryOrgSettings::get();
if (!$settings->isEnabled()) {
// bail out or prompt admin to enable LDAP before invoking the sync command
} Type guard
function isLdapEnabled(): bool {
try {
return \Passbolt\DirectorySync\Utility\DirectoryOrgSettings::get()->isEnabled();
} catch (\Throwable $e) {
return false;
}
} Try / catch
try {
$this->runDirectorySync();
} catch (\Exception $e) {
if (str_contains($e->getMessage(), 'not configured or it is disabled')) {
// redirect admin to /app/administration/users-directory
}
} Prevention
- Configure and enable LDAP in the admin UI before scheduling syncs.
- Check org settings presence after upgrades or settings imports.
- Verify the ldap PHP extension is installed on the host running the command.
- Automate a pre-flight settings check in sync scripts.
When it happens
Trigger: Running `passbolt directory_sync` when the admin has never configured LDAP, or when directory sync is toggled off in administration settings (org settings missing the ldap fields or enabled=false).
Common situations: Fresh EE installations where LDAP was never set up; org settings reset after an upgrade; running the sync command on a machine pointed at a passbolt instance without the LDAP config; ldap PHP extension present but integration disabled.
Related errors
- group(s) returned by your directory are invalid and will be…
- users returned by your directory are invalid and will be…
- An error has occurred parsing groupCustomFilter
- An error has occurred parsing userCustomFilter
- $e->getMessage()
AI-assisted analysis of passbolt/passbolt_api@31c1bbc10f (2026-09-17).
Data as JSON: /api/errors/4014fc84aa71f76a.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/PassboltEe/DirectorySync/src/Command/DirectorySyncCommand.php:85
return $consoleName;
}
/**
* @inheritDoc
*/
public function execute(Arguments $args, ConsoleIo $io): ?int
{
$this->assertCurrentProcessUser($io, $this->processUserService);
$isLdapLoaded = extension_loaded('ldap');
if (!$isLdapLoaded) {
$this->error(__('Error: the ldap extension is not installed'), $io);
$this->abort();
}
$this->directoryOrgSettings = DirectoryOrgSettings::get();
if (!$this->directoryOrgSettings->isEnabled()) {
$io->err(__('The ldap integration is not configured or it is disabled'));
$io->info(
__(
'To fix this problem, you need to configure ldap: {0}.',
[Router::url('/app/administration/users-directory', true)]
)
);
$this->error(__('aborting'), $io);
$this->abort();
}
$this->warnPersist($args, $io);
return $this->successCode();
}
/**
* Check persist argument and displays a warning
*
* @param \Cake\Console\Arguments $args The command argumentsView on GitHub (pinned to 31c1bbc10f)