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

# List delegations

> List the machine identities that can start Agent Vault sessions on behalf of users



## OpenAPI

````yaml GET /api/v1/agent-vault/delegations
openapi: 3.0.3
info:
  title: Infisical API
  description: List of all available APIs that can be consumed
  version: 0.0.1
servers:
  - url: https://us.infisical.com
    description: Production server (US)
  - url: https://eu.infisical.com
    description: Production server (EU)
  - url: http://localhost:8080
    description: Local server
security: []
paths:
  /api/v1/agent-vault/delegations:
    get:
      tags:
        - Agent Vault Delegations
      description: >-
        List the machine identities that can start Agent Vault sessions on
        behalf of users
      operationId: listAgentVaultDelegations
      parameters:
        - schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    maxLength: 4000
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      format: uuid
                    maxItems: 100
          in: query
          name: machineIdentityIds
          required: false
          description: >-
            Return only the delegations of these machine identities. Separate
            several IDs with commas, up to 100.
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 100
          in: query
          name: limit
          required: false
          description: The maximum number of delegations to return.
        - schema:
            type: integer
            minimum: 0
            maximum: 10000
            default: 0
          in: query
          name: offset
          required: false
          description: How many delegations to skip.
        - schema:
            type: string
            minLength: 1
            maxLength: 36
          in: query
          name: projectId
          required: false
          description: The ID of the Agent Vault project.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  delegations:
                    type: array
                    items:
                      type: object
                      properties:
                        machineIdentity:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                              description: >-
                                The ID of the machine identity the delegation
                                belongs to.
                            name:
                              type: string
                              description: The name of the machine identity.
                          required:
                            - id
                            - name
                          additionalProperties: false
                          description: >-
                            The machine identity that can start sessions on
                            behalf of users.
                        scope:
                          type: string
                          enum:
                            - all-members
                            - selected
                          description: >-
                            Which users the machine identity can start sessions
                            on behalf of: every member of the project
                            (all-members), or only the users and the members of
                            the groups in the delegation (selected).
                          example: selected
                        users:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: The ID of the user.
                              username:
                                type: string
                                description: The username of the user.
                              email:
                                type: string
                                nullable: true
                                description: The email address of the user.
                              firstName:
                                type: string
                                nullable: true
                                description: The first name of the user.
                              lastName:
                                type: string
                                nullable: true
                                description: The last name of the user.
                              addedAt:
                                type: string
                                format: date-time
                                description: >-
                                  When the user or group was added to the
                                  delegation.
                            required:
                              - id
                              - username
                              - email
                              - firstName
                              - lastName
                              - addedAt
                            additionalProperties: false
                          description: The users in the delegation.
                        groups:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: The ID of the group.
                              name:
                                type: string
                                description: The name of the group.
                              addedAt:
                                type: string
                                format: date-time
                                description: >-
                                  When the user or group was added to the
                                  delegation.
                            required:
                              - id
                              - name
                              - addedAt
                            additionalProperties: false
                          description: >-
                            The groups in the delegation. Their members are
                            covered while they stay in the group.
                        createdAt:
                          type: string
                          format: date-time
                          description: When the delegation was set up.
                        updatedAt:
                          type: string
                          format: date-time
                          description: When the delegation was last saved.
                      required:
                        - machineIdentity
                        - scope
                        - users
                        - groups
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                  totalCount:
                    type: number
                    description: How many delegations match, across every page.
                required:
                  - delegations
                  - totalCount
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 400
                  message:
                    type: string
                  error:
                    type: string
                  details: {}
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 401
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 403
                  message:
                    type: string
                  details: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 404
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 422
                  message: {}
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  reqId:
                    type: string
                  statusCode:
                    type: number
                    enum:
                      - 500
                  message:
                    type: string
                  error:
                    type: string
                required:
                  - reqId
                  - statusCode
                  - message
                  - error
                additionalProperties: false

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.