LDAP import in ServiceNow brings directory users and groups into staging tables, then uses transform maps to update instance records. Configure the server, scope the organizational units, test the imported attributes, and validate the target records before enabling scheduled imports. Treat membership updates and disabled accounts as separate acceptance checks.
Plan the LDAP import in ServiceNow around record ownership
Start with a written decision about which directory owns each user attribute and which groups belong in the instance. A successful connection does not establish that the returned records are suitable for import. Agree on the expected user population, group population, login identifier, and handling of records that leave the directory scope.
Use the broader LDAP integration overview when deciding how the directory connection fits into access management. For this import, prepare a small acceptance set: an existing user, a new user, a changed user, a group with known members, and a disabled account. Record the expected outcome for each before running the load.
The settings below reflect Brazil; check their availability on your instance and release. Keep the initial scope narrow enough to compare directory entries with staging rows and resulting records individually. Expand it after the same population can be imported again without unexpected duplication.
Define the server and restrict the directory search
Creating an LDAP server requires the admin role. Navigate to All > System LDAP > Create New Server. Enter the connection details, including Login distinguished name, Login password, and Starting search directory. The starting directory establishes the base for subsequent queries. Select Active when the configuration is ready for connection validation.
A MID Server can provide connectivity to an internal directory. Its user needs user_admin to read LDAP server configuration records. Selecting a MID Server makes the LDAP server form’s SSL field unavailable, and LDAP authentication is not available through that connection method. Decide the import connection architecture before building schedules around it.
With admin, open All > System LDAP > LDAP Servers and select the server. In LDAP OU Definitions, configure the Users and Groups definitions. The RDN narrows the search beneath the server’s starting directory. Filter further limits the entries returned. An unrestricted definition can include the subtree beneath that location, so examine the scope before a production load.
Set Query field to an identifier that is unique across the relevant domains and maps to User ID. Active Directory uses sAMAccountName. Save the definition with Update, then use Browse under Related Links to inspect its returned directory records. Check both included and excluded examples; finding one expected employee does not establish that the filter excludes computers or unrelated accounts.
Create data sources and inspect staging records
For the LDAP administration route, admin is required. From the server’s LDAP OU Definitions related list, open Users or Groups, then select New in Data Sources. Enter Name and Import set table name, choose LDAP in Type, and select the appropriate LDAP target. Submit the form.
The import administration route requires import_admin: navigate to All > System Import Sets > Administration > Data Sources and select New. This form includes Import set table label, Import set table name, Type, and LDAP target. Choose the OU definition that matches the intended population rather than relying on a familiar data source name.
Both the LDAP server and OU definition must be active for the LDAP test load. Use Test Load 20 Records to check whether directory attributes reach the import table. These sample records are for testing and cannot be transformed. Examine the staging data before proceeding to a separate import and transformation.
Pay attention to field lengths during that first test. The first test load sets field sizes. If the sampled records contain no User ID values, all later imports use the default length of 40 and User ID is cut to 40 characters. Compare long login identifiers and distinguished names with the directory originals. A shortened identifier can make later matching unreliable even when the load itself appears successful.
Validate users, groups, and repeat imports
A transform map connects staged attributes to target fields. The supplied LDAP User Import map targets sys_user; LDAP Group Import targets sys_user_group. Review the map associated with each data source before execution. Prefer one active map for a given source and target table pair, and verify coalescing rather than enabling overlapping maps to solve missing data.
For a custom user map, preserve the mapping from u_source to source without coalescing. That source value identifies the directory distinguished name and supports manager and group resolution. Map the chosen login attribute to user_name with coalescing enabled. The resulting user_name value must be unique; check for collisions when multiple domains use similar account names.
Reference fields need a separate review. A directory manager value can be a distinguished name rather than a display name. The default LDAP User Import map includes transform scripts for reference handling. Review those scripts before replacing them with direct mappings, which can create unintended referenced records.
- Run the controlled import and compare the new user’s identifier and selected attributes with the directory entry.
- Confirm that the existing user was updated rather than duplicated, then repeat the import and check that result again.
- Inspect the imported group and compare its expected membership with the instance. A group record alone is insufficient evidence that membership is correct.
- Review reference fields and unusually long values, including a user whose manager is imported later in the same run.
Carry the accepted field ownership decisions into ServiceNow user management so later manual edits can be assessed against the next synchronization. Where imported groups support operational routing, confirm each group’s membership before any assignment rule depends on it.
For help planning this work, see ServiceNow implementation.
Schedule synchronization after the first accepted import
The integration includes Example LDAP User Import and Example LDAP Group Import schedules, both inactive initially. Review these examples against the validated data sources. Scheduling an untested transform repeats its defects; enable recurrence after the acceptance set produces the intended user and group records.
Creating a scheduled import requires import_scheduler, import_admin, or admin. Treat import_scheduler as administrator-level access because it can execute scripts with administrator privileges. Navigate to All > System Import Sets > Administration > Scheduled Imports. Select New to create a schedule, then complete Name, Data source, Run as, Active, and Run. Set Run as deliberately: an empty value runs the import as the guest user.
For Run set to Periodically, configure Repeat interval and Starting. For weekly or monthly execution, use Day and Time. Choose off-peak processing and avoid scheduling multiple imports simultaneously. Set the cadence around acceptable directory staleness and measured execution time, leaving room for investigation and recovery.
When a group import depends on users being present, consider Run set to After Parent Runs and select the user import in Parent. This provides an explicit sequence. Concurrent Import does not preserve predictable transformation order, so leave it out where record ordering matters. After execution, use Executions to inspect the run and its execution context, then compare target records with the acceptance set.
Monitor connection failures and account lifecycle gaps
Connection monitoring requires admin. Open All > System Definition > Scheduled Jobs and select LDAP Connection Test. Its default interval is 15 minutes; change Repeat Interval to adjust it. Populate LDAP Admins with the intended notification recipients, because the failure notification needs at least one group member.
The connection test checks only the server URL, its format and the login credentials. Review the schedule execution, staging records, and target changes separately. In the LDAP Log, code 49 indicates invalid credentials; codes 3 and 4 indicate time or size limits that can leave search results incomplete. Investigate those conditions before interpreting a smaller result set as a directory cleanup.
Disabled and deleted accounts deserve their own reconciliation plan. A filter that excludes inactive Active Directory users can prevent the import from seeing that an existing instance user has become disabled. Do not interpret absence from a filtered refresh as evidence that deactivation occurred. Prefer deactivation to deletion when retaining record relationships matters, and test the agreed lifecycle outcome before accepting the synchronization.
Questions to settle before expanding LDAP synchronization
Login can auto-provision users missing from the instance
LDAP auto-provisioning can create a user who exists in the directory but not in sys_user. Configuring auto-provisioning requires admin. Both glide.ldap.authentication and glide.ldap.user.autoprovision must be true. Both ship with the value true, so check the current values in System Properties before assuming auto-provisioning is active. Decide whether that additional creation path fits the population you intend to manage.
Binary identifiers such as objectGUID need a custom transform script
Coalescing on a binary attribute such as objectGUID or objectSID requires a custom transform script. Include that requirement in the design review instead of treating the identifier as an ordinary text field mapping.
No default LDAP transform map covers department records
A default LDAP department transform map is not supplied. If department imports enter the scope, plan and validate their mapping separately from the user and group maps.
Batch properties override the batch settings on the data source
The glide.import_set_load_usebatch and glide.import_set_load_batch_size properties take precedence over corresponding form values. Check those properties before changing Use Batch Import or Batch Size to tune a larger load.