Hello,
I'd like to use AccountManagement to list all the groups in an Organizational Unit.
The following snippet works with DirectoryServices but I would have to instanciate GroupPrincipal with the DirectoryEntry path in the result (which feels like a dirty fix).
DirectoryEntry root = new DirectoryEntry("LDAP://OU=Marketing,OU=Operations,OU=Applications,DC=mycompany,DC=local")
DirectorySearcher ds = new DirectorySearcher(root);
ds.Filter = "(objectCategory=group)";
SearchResultCollection results = ds.FindAll();
Has anyone an idea?
Thanks!