> ## Documentation Index
> Fetch the complete documentation index at: https://confidence.spotify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List UserGroup

> List groups for a user.



## OpenAPI

````yaml /api/iam/api/user.openapi.json get /v1/users/{user}/groups
openapi: 3.1.0
info:
  title: Confidence User API
  version: 1.0.0
  description: API documentation for user
servers: []
security: []
paths:
  /v1/users/{user}/groups:
    get:
      summary: List UserGroup
      description: List groups for a user.
      operationId: UserGroup.list
      parameters:
        - name: user
          in: path
          required: true
          schema:
            type: string
        - name: pageSize
          in: query
          required: false
          description: The maximum number of groups to fetch.
          schema:
            type: object
        - name: pageToken
          in: query
          required: false
          description: Token used for pagination.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  userGroups:
                    type: array
                    items:
                      type: object
                      properties:
                        group:
                          type: object
                          properties:
                            name:
                              type: string
                              description: |-
                                The resource name of the group.
                                 For example:
                                 `groups/1bhq4c2zqigdzqg6ufni/
                            displayName:
                              type: string
                              description: Human friendly name of the group.
                            description:
                              type: string
                              description: Optional description of the group.
                            groupType:
                              type: string
                              enum:
                                - GROUP_TYPE_UNSPECIFIED
                                - USER_CREATED
                                - SYSTEM_CREATED
                              description: The type of the group.
                            createTime:
                              type: object
                              description: Time when the group was first created.
                            updateTime:
                              type: object
                              description: Time when the group was last updated.
                            creator:
                              type: string
                              description: >-
                                Reference to the identity that created this
                                group.
                            updater:
                              type: string
                              description: >-
                                Reference to the identity that last updated this
                                group.
                            labels:
                              type: array
                              items:
                                type: object
                                additionalProperties:
                                  type: string
                              description: General labels for this resource.
                            owner:
                              type: string
                              description: |2-

                                 The owner of the resource. If not set will default to the creator.
                            identity:
                              type: string
                              description: Reference to the identity this group represents.
                          required:
                            - displayName
                            - groupType
                            - createTime
                            - updateTime
                            - creator
                            - updater
                            - identity
                          description: The group that the user is a member of.
                    description: Partial list of returned groups for the user.
                  nextPageToken:
                    type: string
                    description: >-
                      A token that can be used to fetch more groups, empty if no
                      more
                       groups are available.
                required:
                  - userGroups
      security:
        - admin: []
      servers:
        - url: https://iam.eu.confidence.dev
        - url: https://iam.us.confidence.dev
        - url: https://iam.confidence.dev
components:
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````