{"record":{"id":"718b3713fb205664","repo":"RocketChat/Rocket.Chat","slug":"ldap-search-basedn-is-not-configured","errorCode":null,"errorMessage":"LDAP Search BaseDN is not configured.","messagePattern":"LDAP Search BaseDN is not configured\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"apps/meteor/server/lib/ldap/Connection.ts","lineNumber":106,"sourceCode":"\t\t\tauthenticationUserDN: settings.get<string>('LDAP_Authentication_UserDN') ?? '',\n\t\t\tauthenticationPassword: settings.get<string>('LDAP_Authentication_Password') ?? '',\n\t\t\tuseVariables: settings.get<boolean>('LDAP_DataSync_UseVariables') ?? false,\n\t\t\tvariableMap: settings.get<string>('LDAP_DataSync_VariableMap') ?? '{}',\n\t\t\tattributesToQuery: this.parseAttributeList(settings.get<string>('LDAP_User_Search_AttributesToQuery')),\n\t\t};\n\n\t\tthis._variableMap =\n\t\t\t(this.options.useVariables &&\n\t\t\t\twrapExceptions(() => JSON.parse(this.options.variableMap)).suppress(() => {\n\t\t\t\t\tmapLogger.error({ msg: 'Failed to parse LDAP Variable Map', map: this.options.variableMap });\n\t\t\t\t})) ||\n\t\t\t{};\n\n\t\tif (!this.options.host) {\n\t\t\tlogger.warn('LDAP Host is not configured.');\n\t\t}\n\t\tif (!this.options.baseDN) {\n\t\t\tlogger.warn('LDAP Search BaseDN is not configured.');\n\t\t}\n\t}\n\n\tpublic async connect(): Promise<any> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tthis.initializeConnection((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treturn reject(error);\n\t\t\t\t}\n\n\t\t\t\treturn resolve(result);\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic disconnect(): void {\n\t\tthis.usingAuthentication = false;\n\t\tthis.connected = false;","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/lib/ldap/Connection.ts#L88-L124","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nLDAP_Host: 'ldaps://ldap.corp.example.com:636'\nLDAP_BaseDN: ''\n\n// after\nLDAP_Host: 'ldaps://ldap.corp.example.com:636'\nLDAP_BaseDN: 'dc=corp,dc=example,dc=com'","handlingStrategy":"validation","validationCode":"import { settings } from 'meteor/rocketchat:settings-server';\n\nconst baseDN = settings.get<string>('LDAP_BaseDN')?.trim();\nif (settings.get('LDAP_Enable') && !baseDN) {\n  throw new Error('LDAP is enabled but LDAP_BaseDN is empty — set the search base before enabling LDAP');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["ldap","configuration","settings","setup"],"backgroundTag":"missing-required-setting","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}