Avatar of SflahertyEE
SflahertyEE
Flag for United States of America asked on

LDAP query on AD 2003

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?
Microsoft Server OSDatabasesActive Directory

Avatar of undefined
Last Comment
SflahertyEE

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rajith Enchiparambil

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Shift-3

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
LauraEHunterMVP

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SflahertyEE

ASKER
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...

This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23