LDAP is not working

Last updated on
5 June 2017

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Debugging

  1. Enable ldap_help and detailed watchdog logging to get more information on what is occurring.
  2. Try to understand the responses in the log and the different stages in which they occur.
  3. Try narrowing down your problem by making sure that the each step works before moving on to the next, i.e.:
    1. Connection
    2. Bind
    3. Search
    4. Authentication
    5. Authorization
  4. If you are still stuck, you can create a support request. Please always provide detailed log output and information on your configuration because otherwise the maintainers have little to go on. See also /admin/config/people/ldap/help/issues for debugging output you can copy and paste into the issue.

Common Error Messages and Warnings

  • No LDAP Extension is loaded for PHP: Signifies the php ldap extension is not enabled. Use the same steps you would to install any php extension. If it is available with the PHP version you installed, it is simply a matter of uncommenting the ldap link in the php.ini file. e.g. extension=php_ldap.dll for windows.
  • "Possible invalid format for ... 'The format may be correct for your ldap, but please double check.". This warning is given when an ldap attribute name (cn, dn, mail, etc.) is checked to be within ldap standards. Active Directory and other LDAP implementations commonly break these standards, so your attribute name may be correct and still get this error.
  • Could Not start TLS errors. Could not start TLS. (Error -11: Connect error).
    Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Connect error in ...
    These are commonly certificate or open ldap configuration problems. Here are some debugging steps:

Tips for LDAPS/StartTLS

Need to use LDAPS

Some ldap servers require ldaps. Make sure to do the following:

Need to use Start TLS

Help improve this page

Page status: No known problems

You can: