Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How LDAP Imports Link Users with Groups (Group Membership) - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How LDAP Imports Link Users with Groups (Group Membership)
KB0787491

How LDAP Imports Link Users with Groups (Group Membership)


2387 Views Last updated : Jun 28, 2024 public Copy Permalink
KB Summary by Now Assist

Summary

This is done by the OOB onAfter() script of Transform Map LDAP Group Import (/nav_to.do?uri=sys_transform_script.do?sys_id=0dc646160a0a0b26007beb877ee7cdf9). The onAfter() script runs even if the record was ignored during the transform (due to no changes). This onAfter() script will update Group Membership[sys_user_grmember], adding or deleting records as appropriate.
 
More Details
The Script Include that the onAfter script calls relies on the value of the member[u_member] field of the imported LDAP Group Imports[ldap_group_import] record. member[u_member] should have a '^' separated list of all users who are members of that group, for example:
CN=John Smith,OU=IT,DC=ad,DC=ACME,DC=com^CN=Jane Doe,OU=IT,DC=ad,DC=ACME,DC=com
 
The mechanism that the onAfter() script uses is in the code in the GlideLDAPGroups class (in the Java code). Basically this code splits the value of the member field in the staging table (ldap_group_import) record on the '^' character. Each of the sub-strings is the DN of a user who should be added to the group. To add the user to the group, the code queries the sys_user table with the filter 'source=ldap:<DN of one user from member attribute>'. Any pre-existing sys_user_grmember records for users who are no longer seen in that member[u_member] field are removed

Related Links

LDAP Scheduled Data Import Not Updating Group Membership[sys_user_grmember]
On some versions the example LDAP Group Import Scheduled Data Import has the Run as field blank, meaning the import runs as the system user. In London PRB1168978/KB0689665 was fixed, which involved a lot of changes around which users are allowed to give group memberships (and therefore roles, which are tied in to group membership) to others. It looks like this resulted in the system user no longer being able to create or delete Group Membership[sys_user_grmember] records when doing so would grant certain roles to a user.
 
The recommendation is to create an admin Role user specifically for LDAP imports (with a random unknown password) and set that in the Run as field on the LDAP Group Import Scheduled Data Import.
 
Users' group membership is not updated via LDAP import
You can refer to KB0727831 for more information.

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.