I am trying to search for all users in a domain A but I do not wish for the search to dig into the sub-domain B.
How can this be done?
I tried including this into filter but not working:
(!(distinguishedName=*DC=domainA*))
I am using coldfusion LDAP function.
It’s possible you can accomplish what you are describing by using start and scope, rather than filter:
See docs
edit
Alternatively, you could first get all users through the whole directory, then filter it further with a Query of Query call.