> ## 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.

# Grant access

> Grant an Agent Vault access bundle with the Python SDK.

`client.agent_vault.access_bundles.grant()` grants an access bundle to users, machine identities, or groups. Pass at least one ID, and at most 100 in total. 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).

Each user, machine identity, and group must be a member of the Agent Vault project. If a user or machine identity is in the Agent Vault project only through a group, `grant` fails and grants nothing. Grant the access bundle to the group instead, or first [add the user or machine identity to the Agent Vault project](https://infisical.com/docs/documentation/platform/agent-vault/access-control#adding-members).

## Parameters

**access\_bundle\_id** `str` *required*

The ID of the access bundle.

**user\_ids** `List[str]`

The IDs of the users to grant the access bundle to.

**machine\_identity\_ids** `List[str]`

The IDs of the machine identities to grant the access bundle to.

**group\_ids** `List[str]`

The IDs of the groups to grant the access bundle to.

## Returns

**response** `AgentVaultGrantChangeResponse`

The new grants in `members`, and the users, machine identities, and groups that already had the access bundle in `skipped`.

```python Basic theme={"dark"}
response = client.agent_vault.access_bundles.grant(
    access_bundle_id="<access-bundle-id>",
    user_ids=["<user-id>"],  # Optional
    machine_identity_ids=["<machine-identity-id>"],  # Optional
    group_ids=["<group-id>"],  # Optional
)
```

```json Response theme={"dark"}
{
  "members": [
    {
      "type": "user",
      "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "grantedAt": "2026-12-02T12:45:00.000Z"
    },
    {
      "type": "machineIdentity",
      "id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
      "grantedAt": "2026-12-02T12:45:00.000Z"
    }
  ],
  "skipped": [
    {
      "type": "group",
      "id": "9f8e7d6c-5b4a-4392-8170-6f5e4d3c2b1a"
    }
  ]
}
```


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