> ## 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 available users and groups

> List the Agent Vault users and groups that can still be added to a machine identity's delegation



## OpenAPI

````yaml GET /api/v1/agent-vault/delegations/{machineIdentityId}/subjects/available
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/{machineIdentityId}/subjects/available:
    get:
      tags:
        - Agent Vault Delegations
      description: >-
        List the Agent Vault users and groups that can still be added to a
        machine identity's delegation
      operationId: listAvailableAgentVaultDelegationSubjects
      parameters:
        - schema:
            type: string
            enum:
              - user
              - group
          in: query
          name: actorType
          required: false
          description: List only users, or only groups.
        - schema:
            type: string
            maxLength: 255
            pattern: ^[^\x00-\x1f\x7f]*$
          in: query
          name: search
          required: false
          description: Match users by name, username or email address, and groups by name.
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          in: query
          name: limit
          required: false
          description: The maximum number of users and groups to return.
        - schema:
            type: integer
            minimum: 0
            maximum: 10000
            default: 0
          in: query
          name: offset
          required: false
          description: How many users and groups to skip.
        - schema:
            type: string
            minLength: 1
            maxLength: 36
          in: query
          name: projectId
          required: false
          description: The ID of the Agent Vault project.
        - schema:
            type: string
            format: uuid
          in: path
          name: machineIdentityId
          required: true
          description: The ID of the machine identity the delegation belongs to.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - user
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            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.
                            isOrgMembershipPending:
                              type: boolean
                              description: >-
                                Whether the user still has an unaccepted
                                invitation to the organization.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            isActive:
                              type: boolean
                              description: >-
                                Whether the member can currently reach the
                                project.
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - username
                            - email
                            - firstName
                            - lastName
                            - isOrgMembershipPending
                            - role
                            - isActive
                            - addedAt
                          additionalProperties: false
                          title: User
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - machineIdentity
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            name:
                              type: string
                              description: The name of the machine identity.
                            isManagedByAgentVault:
                              type: boolean
                              description: >-
                                Whether Agent Vault created the machine
                                identity. One it owns is deleted rather than
                                removed.
                            orgId:
                              type: string
                              format: uuid
                              nullable: true
                              description: >-
                                The ID of the organization the machine identity
                                belongs to.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            isActive:
                              type: boolean
                              description: >-
                                Whether the member can currently reach the
                                project.
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - name
                            - isManagedByAgentVault
                            - orgId
                            - role
                            - isActive
                            - addedAt
                          additionalProperties: false
                          title: Machine identity
                        - type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - group
                              description: >-
                                Whether this member is a user, a machine
                                identity or a group.
                            id:
                              type: string
                              format: uuid
                              description: The ID of the user, machine identity or group.
                            name:
                              type: string
                              description: The name of the group.
                            role:
                              type: string
                              description: 'The Agent Vault role: admin or member.'
                            isActive:
                              type: boolean
                              description: >-
                                Whether the member can currently reach the
                                project.
                            addedAt:
                              type: string
                              format: date-time
                              description: When the member was added to the project.
                          required:
                            - type
                            - id
                            - name
                            - role
                            - isActive
                            - addedAt
                          additionalProperties: false
                          title: Group
                  totalCount:
                    type: number
                    description: How many users and groups match, across every page.
                required:
                  - members
                  - 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.