Can anyone tell me how to limit queries LDAP against AD to a single OU? Meaning I do not want users to be able to get results from any other OU's just the one I give them access too. I have Mac users who can see the entire directory and I don't want them
to see results except in the one OU; I figure this must be permissions related but how do I configure it?
Uwiden00b
0 Points
1 Post
Limit LDAP queries to a single OU
Jan 23, 2013 07:15 PM|LINK
Can anyone tell me how to limit queries LDAP against AD to a single OU? Meaning I do not want users to be able to get results from any other OU's just the one I give them access too. I have Mac users who can see the entire directory and I don't want them to see results except in the one OU; I figure this must be permissions related but how do I configure it?
thanks!
smirnov
All-Star
24614 Points
4192 Posts
Re: Limit LDAP queries to a single OU
Feb 23, 2013 08:18 AM|LINK
When searching you can specify OU in DirectoryEntry
DirectoryEntry rootEntry = new DirectoryEntry("...OU=XXX...");
or use DirectorySearcher.Filter
DirectorySearcher ds = new DirectorySearcher(rootEntry);
ds.Filter = "...";