LDAP Query Help
Posted on 2012-04-12
I need to write a single LDAP query which looks at a couple of OU's and returns only the user account details. I am running this through custom search in AD as I need to then take the completed query and pass this to an application.
An example of one of the OU's would be:
Any thoughts, I have the basics as being:
* (objectCategory=organizationalUnit)(ou=Accounts)) = Which would return any OU's called accounts
* (objectCategory=Person)(objectClass=User) = Which returns any user account.
I need to combine the two (Which I have tried with a number of &'s and such but with no success) to limit the search scope as the domain I am querying is huge and returning over 10000 records (There are 50k accounts, I dont need all of them!)
Any help you could offer would be great.