We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Filter LDAP exclude specific OU

GaetanoD
ServiceNow Employee

Hi to all,

I need to get all users from LDAP node, but I have to exclude some OU.

This is my current structure of AD:

root

-- OU=Group1

-- OU=Group2

-- OU=Group3

-- OU=Support

----CN=User1

----CN=User2

...

----OU=Operators

-----OU=TEST (I have to exclude this OU)

Thanks,

7 REPLIES 7

Sebastiaan de V
Kilo Guru

On the LDAP OU definition, you can use an filter. If you do a search on LDAP filter, you get plenty of hits. If you have to exclude only one OU (and get all others), the filter is:


(!(OU=TEST))


Thanks for reply.



If I want start witch "Operators" as root ?



I need to get all users starting from OU Operators.


Then you have to define your starting search directory in the LDAP server: LDAP server fields


I set good "starting search" and I add filter, but When I push Browse I see again "OU TEST"