i have a web form that will be submitted and a new user will be created. i need to query multiple OUs to see if a username already exists. i need the query to be flexible enough to accomodate changing OUs. i understand that i will need to run multiple queries
(1 for each OU), but how do i traverse from 1 OU to the next (without hardcoding all the names of the OUs)? obviously, a loop of some sort. one thought of mine: could you get an OU count and then count down that way? there may be another way to do what i need
to do. when you create a new username with the windows tools, i know it automatically compares the existing usernames to the one you're creating. is that the case when connecting with ldap (via a webform)? perhaps i don't need to compare usernames? thanks!
okay...i figured out there was something wrong with the way i was doing the query. i set the searchscope to subtree and it traversed all the OUs. i still would like some input on the best way to compare the proposed username against existing usernames.
Indeed, set the basic level as high as possible so that you can traverse through AD using a subtree search scope. However, great that you solved the problem already :-) Keep up the good work and if you've further questions, don't hesitate to contact us!
rachelk
Member
65 Points
13 Posts
need to query multiple OUs
Jun 03, 2004 03:43 PM|LINK
rachelk
Member
65 Points
13 Posts
Re: need to query multiple OUs
Jun 03, 2004 08:21 PM|LINK
bdesmet
Star
8255 Points
1651 Posts
Re: need to query multiple OUs
Jun 06, 2004 04:28 PM|LINK
Visit www.msdn.be, www.bartdesmet.net