Reputation: 1
using (var pc = new PrincipalContext(ContextType.Domain, ADDomain))
{
using (var gp = GroupPrincipal.FindByIdentity(pc, identity))
{
if (gp != null)
{
var members = gp.GetMembers(true);
foreach (var item in members)
{
/*
* Handle the member but i need info if the memeber comes from the original group or a nested one and if its from a nested one, what was the name of the group?
*/
}
}
}
}
I need to get members from a group (recursive) but i need to keep track of if the member is from the original group or from a nested one, and preferably what the name of the nested group then was.
Looking around i did not find much about this at all.
Upvotes: 0
Views: 37