> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/007_groups/005__list_user_group_members.md).

# List Group Members (Paginated)

GraphQL endpoint: `/user`

Lists the members of a group, with each member's role. The group's member list is only visible to callers allowed to view it (for example, members of the group). Results are cursor-paginated: pass `limit` and the previous page's `nextCursor` as `cursor` to fetch the next page.

## Query

```graphql
query ($groupId: ID!, $limit: Int, $cursor: String) {
  userGroupMembers(groupId: $groupId, limit: $limit, cursor: $cursor) {
    paginationInfo {
      limit
      nextCursor
    }
    records {
      role
      user {
        id
      }
    }
  }
}

```

## Variables

```json
{
  "groupId": "00000000-0000-4000-8000-000000000005"
}
```

## Response

```json
{
  "data": {
    "userGroupMembers": {
      "paginationInfo": {
        "limit": 10,
        "nextCursor": null
      },
      "records": [
        {
          "role": "MEMBER",
          "user": {
            "id": "00000000-0000-4000-8000-000000000001"
          }
        },
        {
          "role": "MEMBER",
          "user": {
            "id": "00000000-0000-4000-8000-000000000002"
          }
        },
        {
          "role": "MEMBER",
          "user": {
            "id": "00000000-0000-4000-8000-000000000003"
          }
        },
        {
          "role": "MEMBER",
          "user": {
            "id": "00000000-0000-4000-8000-000000000004"
          }
        }
      ]
    }
  }
}
```
