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
)?
We can use the below command to find out the user AD groups.
net user (userisid) /domain