How to retrieve the groups a user is part of

Why are you asking two separate questions about essentially the same thing?

Makes it hard to track and confusing.