> ## Documentation Index
> Fetch the complete documentation index at: https://mage-staging.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Key Vault

To use secrets in YAML files (e.g. in data integration pipelines):

1. Add the following keys and values to your environment variables so that
   Mage can access the Azure Key Vault:
   1. `AZURE_KEY_VAULT_URL`: The Azure Key Vault URI.
   2. `AZURE_CLIENT_ID`: Azure Active Directory [client ID](https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-client-application-configuration#client-id).
   3. `AZURE_CLIENT_SECRET`: Azure Active Directy [client secret](https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#add-a-client-secret).
   4. `AZURE_TENANT_ID`: Azure Active Directory [tenant ID](https://learn.microsoft.com/en-us/azure/azure-portal/get-subscription-tenant-id#find-your-azure-ad-tenant).
2. Store a secret in Azure Key Vault.
3. Use the following syntax in your YAML file to interpolate secret values from Azure Key Vault:

   ```yaml theme={null}
   "{{ azure_secret_var('secret_name') }}"
   ```

   For example:

   ```yaml theme={null}
   api_key: "{{ azure_secret_var('API_KEY') }}"
   access_token: "{{ azure_secret_var('ACCESS_TOKEN') }}"
   ```
