Need to exclude specific OU from LDAP

Abhit
Tera Guru

Hi All, 

I need to get all groups from LDAP node, but I have to a group OU=ServiceNow

Filter: (&(objectclass=group)(!(OU=ServiceNow)))

find_real_file.png

But after importing the group still i can see the group with OU=ServiceNow. 

Thanks

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

I had similar requirements so I added below script on Transform Map to ignore those groups from importing.

if(source.u_dn.indexOf("OU=ServiceNow") > -1){
	ignore = true;
}

Once the group is created in SN you will have to delete it before running the job.

View solution in original post

14 REPLIES 14

Hi,

OU is updated properly right?

Thanks,
Ashutosh

Mike Patel
Tera Sage

I had similar requirements so I added below script on Transform Map to ignore those groups from importing.

if(source.u_dn.indexOf("OU=ServiceNow") > -1){
	ignore = true;
}

Once the group is created in SN you will have to delete it before running the job.

Hi @Mike Patel,

Can we not achieve this on the staging table, before creating the transform map.

Thanks

Hi,

So you want to exclude particular groups from importing during LDAP?

You can handle this using onBefore transform script or else using onAfter delete that group

Is the OU not filtering records properly?

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi Ankur,

I tried with this filter. still i could see all the group's getting imported from AD to Staging table.

Filter: (&(objectclass=group)(!(OU=ServiceNow)))

Thanks