Find all groups a member is a member of

I need to find a list of all groups that a given user is a part of. Best option I've found is POSTing to /api/v2/groups/search with a body like this -

{
   "query": [
      {
         "fields": ["owners.id","id"],
         "value": "<a user guid>",
         "type": "EXACT"
      }
   ]
}

I've tried using a variety of field names, but can't get any results. Is there a way to do this other than pulling a list of all groups, and then checking if the user id is part of each group? Thanks

Hello,

If you know the id of the user, you can use GET /api/v2/users/{userId} with expand query parameter containing the value groups (comma separated list - e.g. groups,skills,languages).
This will add a groups array attribute in the response - containing objects with the id of the group the user is member of.

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.