Hello,
i'm trying to exclude a specific OU from a LDAP search , i found some solution but doesn't work for me.
My situation :
The Base DN name for example : Objects
I found this tutorial
https://confluence.atlassian.com/kb/how-to-write-ldap-search-filters-792496933.html
I tryind this : (&(&(objectCategory=Person)(sAMAccountName=*))(!(OU=IT)))
But all is imported. I don't found the reason. It seems works for others..
Thank you for your help.
Hi Julian,
Thanks for your question!
I'm afraid there is no option for you to exclude an OU from a subtree LDAP search. You can confirm this using the same query you mentioned, creating a test LDAP query on the Saved Queries located on the Active Directory Users and Computers.
You should see all the users in the results.
That said, I would recommend you filter the users who are members of a certain group, like Jira Users.
The query should look like the following:
(&(objectCategory=Person)(sAMAccountName=*)(memberOf:1.2.840.113556.1.4.1941:=cn=Jira Users,ou=users,dc=company,dc=com))
Hoping it helps, please let me know your thoughts.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.