> ## 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 who you can add to an Agent Vault delegation with the Node.js SDK.

`client.agentVault().delegations.listAvailableSubjects()` lists the users and groups in the Agent Vault project that you can add to a machine identity's delegation. The client must log in as a user or machine identity with the **Admin** role in the [Agent Vault project](https://infisical.com/docs/documentation/platform/agent-vault/access-control#product-membership).

## Parameters

**machineIdentityId** `string` *required*

The ID of the machine identity.

**options** `object` *required*

**properties**

**projectId** `string` *required*

The ID of the [Agent Vault project](https://infisical.com/docs/documentation/platform/agent-vault/projects.md#find-the-project-id) to list users and groups from.

**actorType** `AgentVaultMemberType`

Either `AgentVaultMemberType.User` (`"user"`) to list only users or `AgentVaultMemberType.Group` (`"group"`) to list only groups (defaults to listing both).

**search** `string`

Text to find in user names, usernames, email addresses, and group names.

**limit** `number`

The maximum number of users and groups to return, from 1 to 100 (defaults to `20`).

**offset** `number`

The number of users and groups to skip (defaults to `0`).

## Returns

**result** `ListAgentVaultMembersResponse`

The users and groups in `members`, and the total number of matching users and groups in `totalCount`.

```typescript Basic theme={"dark"}
const { members, totalCount } = await client.agentVault().delegations.listAvailableSubjects("<machine-identity-id>", {
  projectId: "<project-id>"
});
```

```typescript Users only theme={"dark"}
import { AgentVaultMemberType } from "@infisical/sdk";

const { members, totalCount } = await client.agentVault().delegations.listAvailableSubjects("<machine-identity-id>", {
  projectId: "<project-id>",
  actorType: AgentVaultMemberType.User,
  search: "jsmith",
  limit: 20,
  offset: 0
});
```

```json Response theme={"dark"}
{
  "members": [
    {
      "type": "user",
      "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "username": "jsmith@example.com",
      "email": "jsmith@example.com",
      "firstName": "Jo",
      "lastName": "Smith",
      "isOrgMembershipPending": false,
      "role": "member",
      "isActive": true,
      "addedAt": "2026-11-10T16:05:00.000Z"
    }
  ],
  "totalCount": 1
}
```


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