Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Finding organization units in AD

$
0
0

DirectoryEntry root = new DirectoryEntry("LDAP://dc=me,dc=com");
DirectorySearcher searcher = new DirectorySearcher(root);
searcher.Filter ="(&(objectCategory=group)(memberOf=cn=mygroup));

My code above works fine for finding groups within groups, but does not work for Organisational groups.
What am I going wrong?

I need to find organization units  one hierarchy level at a time.


Certified Geek



Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>