LDAP integration troubleshooting

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of LDAP Integration Troubleshooting

    This document provides guidance for troubleshooting LDAP integration issues in ServiceNow. It covers preliminary checks, error codes, integration considerations for multiple domains, and automatic connection tests to ensure smooth user access and system functionality.

    Show full answer Show less

    Preliminary Checks

    • Ensure LDAP availability; users cannot log in if it's down. Maintain local accounts for administrators to ensure access.
    • Check the service account for expiration or lockout.
    • Verify the username format; use domain with username or username@domain.
    • Confirm that the systemid in the ldapserverconfig record is correctly set to avoid connection issues.

    Error Codes

    The LDAP log file contains standard error codes for LDAP and Active Directory. Two-digit codes represent LDAP errors, while three-digit codes are for Active Directory errors. Consult the LDAP Error Codes documentation for common issues.

    Multiple Domain Integration

    For integrating multiple domains, create separate LDAP server records for each domain, ensuring each points to its respective domain controller. It’s important to identify unique LDAP attributes for user accounts, as multiple Active Directory forests with a single LDAP account are not supported. Common unique attributes include objectSid, email, or userPrincipalName.

    Incoming Records

    Use LDAP transform maps to manage incoming records missing matching reference field values, addressing common authentication errors such as "User Cannot Log In" or "Invalid DN".

    Automatic LDAP Connection Tests

    ServiceNow can automatically test LDAP server connections each time the LDAP Server form is opened or through a scheduled job that runs every 15 minutes by default. If a connection fails, a retry job will attempt to reconnect based on the configured intervals. Notifications of connection issues will appear on the form. Testing for servers behind a MID server is also supported.

    If you are integrating your LDAP server and have questions, these items may help you troubleshoot the issue.

    Preliminary checks

    • If the LDAP is unavailable, users cannot log in to the instance. A good practice is to have local accounts for administrators so that if the LDAP is down, administrators can still access the instance.
    • Check the service account to ensure that it is not expired or locked out.
    • Check the format of the username. Instead of using just the username, try using the domain with the username, or username@domain.
    • Verify that you have changed the system_id entry on the ldap_server_config record. If you modify the system_id unintentionally with an update set, system_id points to the wrong node for the target instance and does not work.

    Error codes

    The LDAP log file lists industry standard error codes for both LDAP and Active Directory (AD). The LDAP log file is contained in the wrapper file. The LDAP error codes are two-digit numbers, while the Active Directory error codes are three-digit numbers. For a list of the most-common error codes, see LDAP Error Codes.

    Multiple domain integration

    You can integrate multiple domains within the same forest or in completely non-trusted domains. It is recommended that you create a separate LDAP server record for each domain. Each LDAP server record must point to a domain controller for that given domain. This means you will have to allow connections to each of the domain controllers. Multiple AD forests through LDAP with one LDAP account is not supported.

    When you expand to more than one domain, it is critical that you identify unique LDAP attributes for the application usernames and import coalesce values. A common unique coalesce attribute for Active Directory is objectSid. Unique usernames will vary based on your LDAP data design. Common unique attributes are email or userPrincipalName.

    Incoming records

    See LDAP transform maps to set how the integration processes incoming LDAP records that are missing matching values in reference fields.

    Common authentication errors

    • User Cannot Log In (Invalid DN)
    • Invalid CN
    • Invalid Connection

    Automatic LDAP connection tests

    You can manually test connections to LDAP servers or allow ServiceNow to automatically test the connections.

    The system tests the connection automatically:
    • Every time a user opens the LDAP Server form.
    • Through the LDAP Connection Test scheduled job, which runs every 15 minutes by default.

      You can change how often this scheduled job runs. If this scheduled job is not able to establish a connection, a new one-time schedule job retries the connection test after either five minutes, or half the Repeat Interval value in the scheduled job, whichever occurs first.

    Error messages appear on the form if there are any issues connecting to the LDAP server. Also supported are test connections for servers behind a MID server.