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

# Integrating Azure Key Vault

Bruno integrates with Azure Key Vault to securely fetch secrets for use in your collections. The provider is configured once in **Preferences** and can then be attached to any collection environment.

Two authentication methods are supported: **Manual** and **Azure CLI**.

## Manual Configuration

1. Go to **Preferences** settings and navigate to the **Secrets Manager** section.

2. Click the `+ Add Secret Manager` button.

3. Select **Azure Key Vault** as the provider type.

4. Enter your credentials:
   * **Name** - name of your secret manager account, e.g. **Production Secrets**
   * **Tenant ID** - your Azure Active Directory (AAD) tenant ID
   * **Client ID** - the AAD application (client) ID
   * **Client Secret** - the AAD client secret value

5. Click **Test Connection** to verify the credentials.

6. Click **Add** to save the provider.

![azure-preference-config](https://mintcdn.com/bruno-a6972042/5Lfx5Y84o3IdcSG8/images/screenshots/v4/secret-managers/azure-preference-config.webp?fit=max\&auto=format\&n=5Lfx5Y84o3IdcSG8\&q=85\&s=4062d353a8cabbb065da7fbfee288fee)

## Azure CLI

If you are already authenticated with `az login`, you can use your active session instead of entering credentials manually.

For full setup steps see the [Azure CLI Authentication](https://docs.usebruno.com/secrets-management/secret-managers/azure-key-vault/cli-authentication.md) guide.

## Exporting as a .env file

Once a provider is saved, you can export its configuration as a `.env` file directly from **Preferences** > **Secrets Manager**. This is useful for passing credentials to the Bruno CLI or seeding a CI/CD pipeline without manually transcribing values.

1. In the **Secrets Manager** list, hover over the account you want to export.
2. Click the **Export as .env** icon (the square-with-arrow icon on the right).
3. Bruno writes the credentials to a `.env` file on your machine.

![export-as-env](https://mintcdn.com/bruno-a6972042/5Lfx5Y84o3IdcSG8/images/screenshots/v4/secret-managers/export-as-env.webp?fit=max\&auto=format\&n=5Lfx5Y84o3IdcSG8\&q=85\&s=56a18a2ef34d91287e989d56f5d3169a)

> [!WARNING]
>
> The exported `.env` file contains your Azure credentials in plain text. Add it to `.gitignore` immediately and never commit it to version control.

Pass the exported file to the CLI using the `--secrets-env-file` flag:

```bash theme={null}
bru run collection/ --env Production --secrets-env-file ./secrets.env
```

## Next Steps

* [Configure and fetch secrets](https://docs.usebruno.com/secrets-management/secret-managers/azure-key-vault/configuring-and-fetching-secrets.md) — attach the provider to an environment and pull secrets into Bruno
* [Use secrets in requests](https://docs.usebruno.com/secrets-management/secret-managers/azure-key-vault/using-secrets.md) — reference fetched secrets in headers, body, auth fields, and scripts
