Query on LDAP Integration

SanketKumaS
Tera Contributor

The users and groups have already been imported into the ServiceNow instance by a LDAP server.Requirement is that we need to edit the Groups LDAP OU definitions to bring new groups into sys_user_group and add membership without creating new users in the sys_user table.If the user,that is to be added to the groups,is not present in the sys_user table then it should show an error message that 'user doesn't exist' but it shouldn't create that new user.We will import the groups from the server based on a particular filter.Could anyone suggest how we can achieve this and where do we need to edit in order to achieve this?

5 REPLIES 5

JenniferRah
Mega Sage

In the Transform Map of your group import, add an onAfter script that says this:

ldapUtils.addMembers(source, target);

 

I'm pretty sure that's an OOTB script include.

The onAfter transform script with the same script is already present for group import.

That's all we have, and it's creating the sys_user_grmember entries. Do you have any customizations to that script include?

No groups have been sourced from LDAP server yet.The requirement is to source the groups and add group membership.Only the users have been sourced from LDAP. We need to source the groups from LDAP and add the user membership to the groups for the already existing users.If any user from LDAP is to be added to the groups as member and it is not present already in ServiceNow instance then it should show an error and not add the new user record to the sys_user table. Only the existing users should be added to the groups sourced from LDAP.And no new or duplicate user record should be created in the sys_user table.