TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation User Groups List Group Members (Paginated)

List Group Members (Paginated)

On this page

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

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

Variables

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

Response

{
  "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"
          }
        }
      ]
    }
  }
}