> 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/003__list_users_groups.md).

# List User's Groups

GraphQL endpoint: `/user`

Lists the user's groups. This returns the groups the current user is a member of.

## Query

```graphql
query (
  $limit: Int
) {
  userGroups (
    limit: $limit
  ) {
    role
    group {
    id
    name
    metadata
    logo_url
    visibility
    }
  }
}

```

## Variables

```json
{}
```

## Response

```json
{
  "data": {
    "userGroups": [
      {
        "group": {
          "id": "00000000-0000-4000-8000-000000000001",
          "logo_url": "logo_url",
          "metadata": {
            "test": "value"
          },
          "name": "test group",
          "visibility": [
            "PUBLIC"
          ]
        },
        "role": "MEMBER"
      },
      {
        "group": {
          "id": "00000000-0000-4000-8000-000000000002",
          "logo_url": "logo_url",
          "metadata": {
            "test": "value"
          },
          "name": "test group",
          "visibility": [
            "PUBLIC"
          ]
        },
        "role": "MEMBER"
      },
      {
        "group": {
          "id": "00000000-0000-4000-8000-000000000003",
          "logo_url": "logo_url",
          "metadata": {
            "test": "value"
          },
          "name": "test group",
          "visibility": [
            "PUBLIC"
          ]
        },
        "role": "MEMBER"
      },
      {
        "group": {
          "id": "00000000-0000-4000-8000-000000000004",
          "logo_url": "logo_url",
          "metadata": {
            "test": "value"
          },
          "name": "test group",
          "visibility": [
            "PUBLIC"
          ]
        },
        "role": "MEMBER"
      },
      {
        "group": {
          "id": "00000000-0000-4000-8000-000000000005",
          "logo_url": "logo_url",
          "metadata": {
            "test": "value"
          },
          "name": "test group",
          "visibility": [
            "PUBLIC"
          ]
        },
        "role": "MEMBER"
      }
    ]
  }
}
```
