---
title: "Get groups for a user"
method: GET
path: "/users/{id}/groups"
tags: ["Users"]
---

# Get groups for a user

`GET /users/{id}/groups`

## Request

- Base URL: `/v1` (relative, and the document’s source URL is not known)
- URL: `/v1/users/{id}/groups`
- Auth: API key in header `Authorization`

Gets the details of groups that a given user is a member

## Path parameters

- `id` string, required

## Response `200`

The user groups details

- GroupList: A list of groups
  - `groups` Group[]
    - `id` string: The group ID
    - `name` string: The group name
    - `precedence` integer: The priority of the group
    - `created` string, date-time: The date the group was created
    - `last_modified_date` string, date-time
    - `role_arn` string
    - `user_pool_id` string
  - `count` integer

## Other responses

- `401`: Authentication information is missing or invalid
- `404`: User not found
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/identity-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/identity-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/identity-api/revisions/6472459b6b03?raw)
