Chris | 2021-09-05 17:06:27 UTC | #1
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
Jerome.Saint-Marc | 2021-09-06 07:31:15 UTC | #2
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,
system | 2021-10-07 07:32:03 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11920