I have found many results on how to get all members of an AD group, but not the other way round.

How can I get all AD groups a given SPUser belongs to and not just the SharePoint groups of that user (with user.Groups)?

1 Answer 1


We can use the below command to find out the user AD groups.

  1. Run command promt as an admin.
  2. Run command - net user (userisid) /domain
  • And how would this be done in code? I require this information on a WebPart I am developing...
    – F.P
    Commented Apr 7, 2015 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.