using(var ServerContext = new PrincipalContext(ContextType.Domain))
{
GroupPrincipal outerGroupPrincipal = new GroupPrincipal(ServerContext, alt);
PrincipalSearcher principalSearcher = new PrincipalSearcher(outerGroupPrincipal);
foreach (var found in principalSearcher.FindAll())
{
GroupPrincipal innerGroupPrincipal = found as GroupPrincipal;
if (innerGroupPrincipal != null)
{
foreach (Principal p in innerGroupPrincipal.GetMembers())
{
var hello = "goodbye";
}
}
}
}
Monday, April 27, 2020
System.DirectoryServices.AccountManagement beyond System.DirectoryServices.ActiveDirectory
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment