We help IT Professionals succeed at work.

LDAP query on AD 2003

226 Views
Last Modified: 2013-12-05
Hi Experts,
I'm having a problem querying an LDAP and had a question. What would be the proper format if I just want to query the domain tree and return info regarding the users. In other words, previously i would query within an OU and get results for users within that OU. But if I want to move up a level and query the domain and get results that list the username, and OU they're in...

So up until this point, my query was as below;
OU=NY, DC=DomainA, DC=local

but what if I want my query string to be just DC=DomainA, DC=local  and return all the users and they're OU's they're associated in.
I was assuming i would use some sort of wildcard character for the OU=   but that hasn't worked...
any ideas?
Comment
Watch Question

Office 365 & Exchange Architect
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks for the input folks, however think i realized where i went wrong... i was trying to develop & use search controls and basically in the code you are meant to set the search to a value of
SCOPE_SUBTREE, it by default is set to only the current object.  Once I
changed that and added search controls to my search I was golden...

will award some points for your efforts however because they did help a bit...

Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.