RocketChat/Rocket.Chat · warning
LDAP Search BaseDN is not configured.
Error message
LDAP Search BaseDN is not configured.
What it means
Logged by the LDAP Connection constructor when the LDAP Base DN (search base) setting is empty. Without a base DN the server cannot scope its directory searches, so user lookup, login, and data sync effectively cannot find any entries. The Connection object is still created; this warning flags the incomplete configuration early.
Source
Thrown at apps/meteor/server/lib/ldap/Connection.ts:106
authenticationUserDN: settings.get<string>('LDAP_Authentication_UserDN') ?? '',
authenticationPassword: settings.get<string>('LDAP_Authentication_Password') ?? '',
useVariables: settings.get<boolean>('LDAP_DataSync_UseVariables') ?? false,
variableMap: settings.get<string>('LDAP_DataSync_VariableMap') ?? '{}',
attributesToQuery: this.parseAttributeList(settings.get<string>('LDAP_User_Search_AttributesToQuery')),
};
this._variableMap =
(this.options.useVariables &&
wrapExceptions(() => JSON.parse(this.options.variableMap)).suppress(() => {
mapLogger.error({ msg: 'Failed to parse LDAP Variable Map', map: this.options.variableMap });
})) ||
{};
if (!this.options.host) {
logger.warn('LDAP Host is not configured.');
}
if (!this.options.baseDN) {
logger.warn('LDAP Search BaseDN is not configured.');
}
}
public async connect(): Promise<any> {
return new Promise((resolve, reject) => {
this.initializeConnection((error, result) => {
if (error) {
return reject(error);
}
return resolve(result);
});
});
}
public disconnect(): void {
this.usingAuthentication = false;
this.connected = false;View on GitHub (pinned to b2c16d5842)
Solutions
- Set Administration > LDAP > Search Base DN (LDAP_BaseDN) to your directory root, e.g. 'dc=corp,dc=example,dc=com' (AD) or 'ou=people,dc=example,dc=org' (OpenLDAP)
- Verify the DN with an ldapsearch -b <basedn> to confirm entries are actually under it
- Check that the value saved correctly (rocketchat_settings) if the warning continues
- Re-run the LDAP sync/login after saving to confirm users are found
Example fix
// before LDAP_Host: 'ldaps://ldap.corp.example.com:636' LDAP_BaseDN: '' // after LDAP_Host: 'ldaps://ldap.corp.example.com:636' LDAP_BaseDN: 'dc=corp,dc=example,dc=com'
Defensive patterns
Strategy: validation
Validate before calling
import { settings } from 'meteor/rocketchat:settings-server';
const baseDN = settings.get<string>('LDAP_BaseDN')?.trim();
if (settings.get('LDAP_Enable') && !baseDN) {
throw new Error('LDAP is enabled but LDAP_BaseDN is empty — set the search base before enabling LDAP');
} Prevention
- Always configure Host + Base DN + search filter together before flipping LDAP_Enable
- Validate the Base DN with ldapsearch -H <host> -b <basedn> before enabling
- Watch the server log on first LDAP operation — the two 'not configured' warnings name the exact gaps
When it happens
Trigger: A new Connection is constructed (LDAP login, sync, search) while settings.get('LDAP_BaseDN') is empty — e.g. LDAP enabled and Host filled, but the Search Base DN field left blank in Administration > LDAP.
Common situations: Partial LDAP setup where Host was configured but Base DN skipped; copied settings from another server with the Base DN stripped; using a style like host-only config where the admin assumed the root DSE would be used.
Related errors
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/718b3713fb205664.
Report an issue: GitHub.