0

I am using the following code found here to retrieve a user's AD groups:

protected ArrayList GetADGroups()
{
    ArrayList groups = new ArrayList();

    foreach (IdentityReference group in HttpContext.Current.Request.LogonUserIdentity.Groups)
    {
        groups.Add(group.Translate(typeof(NTAccount)).ToString());
    }

    return groups;
}

This works great to find top-level groups, however, it does not seem to retrieve any nested groups.

How do I do that?

Community
  • 1
  • 1
Sesame
  • 3,370
  • 18
  • 50
  • 75

0 Answers0