Claude Platform Docs
AdminEncryption keys (CMEK)

Configure Azure Key Vault for CMEK

Use Azure Key Vault to provide an encryption key for your organization.

Claude Code

Let Claude Code set up this feature for you

/claude-api help me configure a customer-managed encryption key with Azure Key Vault

This guide shows how to use an Azure Key Vault key as a customer-managed encryption key (CMEK) for your Anthropic organization.

Prerequisites

  • An Azure Key Vault with these settings:
    • RBAC authorization is enabled (enableRbacAuthorization: true).
    • Public network access is allowed. Private endpoints are not supported.
    • Purge protection is enabled (enablePurgeProtection: true). You can't turn off purge protection after you enable it.
    • Diagnostic settings route the AuditEvent log category to Log Analytics, a storage account, or an event hub. Without them, you have no audit trail of Anthropic's key operations, such as KeyWrap, KeyUnwrap, and KeyGet.
  • Permissions to create keys in the vault and to assign RBAC roles on it.
  • Permissions to create service principals in your Entra tenant (Application Administrator, Cloud Application Administrator, or an equivalent custom role).
  • The az CLI installed and authenticated, or Cloud Shell in the Azure portal. Some steps have no portal equivalent.
  • To register the key through the API, an Anthropic Admin API key for your organization.

Anthropic app information

You give the following Anthropic multitenant application access to your key. The application requests no Microsoft Graph permissions.

FieldValue
Multitenant app client ID (US)8635ae1a-3e5d-44e8-a4ed-e0f614466f87
App display nameanthropic-cmek-client-us

Encryption key setup

The key must meet these requirements:

  • Type: RSA, 3072-bit or larger. For an HSM-backed key, use RSA-HSM, which requires a Premium-SKU vault.
  • Permitted operations: wrapKey and unwrapKey. The steps in this guide turn off every other operation, so Anthropic can only read the key and wrap and unwrap with it.
  • Organization tag: anthropic-org-<ORGANIZATION_UUID> with the value true. Replace <ORGANIZATION_UUID> with your Anthropic organization ID in lowercase. Validation fails without the tag.
  • Access: the Key Vault Crypto User role for Anthropic's service principal, assigned on the key.

Create the key and grant access

  1. Create Anthropic's service principal

    Open Cloud Shell from the portal's top navigation bar. Run this command:

    az ad sp create --id 8635ae1a-3e5d-44e8-a4ed-e0f614466f87

    If the service principal already exists, continue to the next step.

  2. Confirm the service principal exists

    Go to Microsoft Entra ID > Enterprise applications and clear the default application-type filter. Search for anthropic-cmek-client-us.

    Microsoft Entra enterprise application overview for anthropic-cmek-client-us, showing its Application ID and Object ID.

    The anthropic-cmek-client-us service principal in Entra enterprise applications.
  3. Open the Create a key page

    Open your key vault and select Keys. Click Generate/Import.

  4. Create an RSA key in your vault

    Set these values:

    • Name: a name for the key
    • Key type: RSA
    • RSA key size: 3072 or larger

    Click the link next to Tags.

  5. Add the organization tag

    Enter these values:

    • Tag Name: anthropic-org-<ORGANIZATION_UUID>
    • Tag Value: true

    Click OK, then click Create.

    Azure Key Vault Create a key page with RSA, 3072 key size, and the anthropic-org tag set to true.

    Create an RSA key sized 3072 or larger, with the tag anthropic-org-<ORGANIZATION_UUID> set to true.
  6. Limit the permitted operations

    Open the new key, then open its current version. Under Permitted operations, clear every checkbox except Wrap Key and Unwrap Key. Click Save.

    Azure Key Vault key version with 1 tag and Permitted operations limited to Wrap Key and Unwrap Key.

    Restrict permitted operations to Wrap Key and Unwrap Key. The key version shows the organization tag.
  7. Open the key's access control

    Open the key itself, not the vault. Select its Access control (IAM) tab and click Add > Add role assignment.

  8. Select the role

    On the Role tab, select Key Vault Crypto User. Click Next.

  9. Add Anthropic's service principal

    On the Members tab, click Select members. Search for anthropic-cmek-client-us and select it. Click Select, then click Next.

  10. Review and assign

    On the Review + assign tab, click Review + assign.

To use a key you already have, follow these steps instead of steps 3 to 6, then continue from step 7:

  1. In your key vault, select Keys and open the key. Open its current version.
  2. Click the link next to Tags.
  3. Add the organization tag and click OK.
  4. Under Permitted operations, clear every checkbox except Wrap Key and Unwrap Key.
  5. Click Save.

Check your vault configuration

Run this command with the Azure CLI or in Cloud Shell. Replace <your-vault-name> with the name of your key vault.

az keyvault show --name <your-vault-name> \
  --query "{rbac:properties.enableRbacAuthorization, purge:properties.enablePurgeProtection, pub:properties.publicNetworkAccess, net:properties.networkAcls.defaultAction, ipRules:properties.networkAcls.ipRules, uri:properties.vaultUri, tenantId:properties.tenantId}"

Confirm these values:

  • rbac: true
  • purge: true. If it's false or null, enable purge protection before you continue.
  • pub: "Enabled". If it's "Disabled", turn on public network access.
  • net: "Allow", or "Deny" with Anthropic's outbound IP ranges in ipRules. For the ranges, see Outbound IP addresses.

Copy these values to register the key:

  • uri: the vault URI
  • tenantId: the ID of the tenant that governs the vault

Register the key with Anthropic

  1. Open the encryption key settings

    In the Claude Console, go to the Data retention page (platform.claude.com/settings/privacy). If you don't see Encryption keys, select Organization from the dropdown menu at the top of the page.

  2. Add the key

    Under Encryption keys, click Add key. Enter a Display name and select Azure Key Vault. Click Continue.

  3. Enter the key details

    The dialog box shows an Organization tag. Check that your key has this tag. Enter these values:

    • Vault URI: the uri value that you copied
    • Key name: the name of the key
    • Tenant ID: the tenantId value that you copied

    Click Add.

  4. Validate the key

    In the Encryption keys list, click Verify next to the key. Connected appears when the check passes. If it fails, see Troubleshoot validation for common causes.

  5. Attach the key to a workspace

    Attaching a key can't be undone. If you can, attach it to a new workspace before that workspace receives any requests. In a workspace that already receives requests, the key can take up to a day to take effect.

    On the Data retention page, select the workspace from the dropdown menu at the top of the page. Under Encryption key, select the key and click Save.

  6. Confirm the change

    Select the checkbox to confirm that you have read the CMEK documentation, then click Confirm.

Troubleshoot validation

If validation fails, common causes are:

  • Wrong organization tag: Make sure the key's current version has the tag anthropic-org-<ORGANIZATION_UUID> with the value true. The organization ID must be the bare UUID in lowercase.
  • RBAC propagation delay: Role assignments can take a few minutes to take effect. Wait and retry.
  • Network ACLs blocking Anthropic: Confirm public network access and ipRules, as described in Check your vault configuration.
  • Conditional access policies on workload identities: If your tenant has conditional access policies that target service principals, exclude the Anthropic service principal. Or add Anthropic's outbound IP ranges to the policy's named locations.

Terraform

To create the key with Terraform, use the azurerm and azuread providers.

Was this page helpful?