Last post Feb 03, 2009 04:26 AM by shyam02
Jan 30, 2009 05:30 AM|shyam02|LINK
I think someone can help me on this.
I would like to filter the active directory search with a organisation unit. I want to get all users under a particular OU. I tried by giving filter as
but both didn't workout.
Jan 30, 2009 06:12 PM|whighfield|LINK
You can't use a filter to filter based on the OU from what I remember.
With that these guys seemed to find a solution/hack to do it
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_22472121.html just scroll to the bottom of the page to find the solution and see if it will
work for you.
Feb 03, 2009 04:26 AM|shyam02|LINK
Thanks... But I couldn't arrive at a solution yet... Is there any way to refer OU in LDAP connection string. My connection string need username and password to get connected. Am using
dirEntry = New DirectoryEntry(DomainName, UserName, Password)
to open connection to active directory.
also in the link: http://computerperformance.co.uk/Logon/LDAP_attributes_active_directory.htm
its saying that ObjectClass attribute can be used to filter the users within an OU ("objectClass = User. Also used for Computer, organizationalUnit, even container. Important top level container.")
Can anyone help me since this fix is an urgent one.