Azure Key Vault Secret Reads Return 403 After a Workload Identity Change
Overview
Work out whether an Azure Key Vault 403 comes from an identity, RBAC, firewall or private DNS change, then restore least-privilege access to the secret.
Destructive operation
This intervention contains destructive operations. Proceed with extreme caution and ensure database backups exist before execution.
Diagnose
Symptom
What responders observe.
An Azure workload that used to read a Key Vault secret now gets HTTP 403 Forbidden after a change to its managed identity, deployment slot or service principal.
Detection
Metrics, logs and confirmation commands.
-
From the workload context, run
az account show --query '{tenant:tenantId,subscription:id,user:user}'and record the authenticated tenant and identity. -
Run
az keyvault show --name <VAULT_NAME> --query '{id:id,rbac:properties.enableRbacAuthorization,publicNetworkAccess:properties.publicNetworkAccess}'. -
Run
az role assignment list --assignee-object-id <PRINCIPAL_OBJECT_ID> --scope <VAULT_RESOURCE_ID> --include-inheritedwhen the vault uses Azure RBAC. -
If the vault uses legacy access policies, inspect
az keyvault show --name <VAULT_NAME> --query properties.accessPolicies. -
Read the Key Vault diagnostic logs and the full 403 inner error, which tell an authorisation failure apart from a firewall or private-endpoint DNS rejection.
-
Resolve
<VAULT_NAME>.vault.azure.netfrom the workload network and check it reaches the public or private endpoint you expect.
Commands in these steps
az account show --query '{tenant:tenantId,subscription:id,user:user}'az keyvault show --name <VAULT_NAME> --query '{id:id,rbac:properties.enableRbacAuthorization,publicNetworkAccess:properties.publicNetworkAccess}'az role assignment list --assignee-object-id <PRINCIPAL_OBJECT_ID> --scope <VAULT_RESOURCE_ID> --include-inheritedaz keyvault show --name <VAULT_NAME> --query properties.accessPolicies
Root cause
Why the incident occurred.
-
Either the redeployed workload now uses a different principal object ID or tenant from the identity that holds Key Vault data-plane permission, or its request arrives by a network path the vault firewall rejects.
-
Azure control-plane access to the vault resource does not by itself grant data-plane access to secrets.
Contain and prevent
Blast radius
What else this can affect.
Applications using the changed identity cannot retrieve required secrets, keys, or certificates.
Dependent deployments can fail readiness checks or fall into restart loops.
An emergency role assignment with a broad scope could expose vault data beyond the affected workload.
Prevention
Controls and guardrails that stop it recurring.
-
Treat managed identity object IDs and Key Vault role assignments as deployment dependencies.
-
Monitor Key Vault 403 responses and retain data-plane diagnostic logs.
-
Test private DNS resolution and secret reads from the workload network during deployment validation.
-
Keep Azure RBAC assignments narrowly scoped, and manage them through reviewed infrastructure as code.
Fix
Pre-flight checks
Check these before you change anything.
-
Confirm the exact principal object ID the failing workload uses; an application/client ID is not a substitute for it.
-
Confirm the vault uses Azure RBAC; stop and use the approved legacy access-policy procedure if
enableRbacAuthorizationis false. -
Record all current role assignments at the vault scope and the current firewall/private endpoint configuration.
-
Check DNS and the network path first: adding RBAC permission will not fix a firewall rejection.
-
Confirm the least-privilege role required by the workload and obtain the vault owner's approval.
-
Make sure the operator can remove the new assignment straight away if the scope or principal is wrong.
Commands
az role assignment create --assignee-object-id <PRINCIPAL_OBJECT_ID> --assignee-principal-type ServicePrincipal --role 'Key Vault Secrets User' --scope <VAULT_RESOURCE_ID>
az role assignment list --assignee-object-id <PRINCIPAL_OBJECT_ID> --scope <VAULT_RESOURCE_ID> --include-inherited
Verify and recover
Verification
Evidence required before you close the incident.
-
Using the workload's own identity and network path, read the required non-test secret once more and confirm it succeeds without its value appearing in logs.
-
Confirm Key Vault logs show the intended principal object ID and a successful data-plane operation.
-
Verify the assignment scope is the individual vault rather than the subscription or management group.
-
Confirm an unrelated principal remains denied.
-
Monitor application health and Key Vault authorization failures for at least 15 minutes.
Rollback
The safe way back.
-
If the assignment went to the wrong principal or grants access nobody intended, take the new assignment's exact ID from the role-assignment listing run after the change and remove it with
az role assignment delete --ids <NEW_ASSIGNMENT_ID>. -
Re-run the denied-access test for the unintended principal, then restore service through the approved identity or network remediation path.
Commands in this rollback
az role assignment delete --ids <NEW_ASSIGNMENT_ID>
Escalate when
Conditions that need another owner.
-
The vault uses legacy access policies or a deny assignment prevents Azure RBAC access.
-
The 403 comes from private endpoint DNS, firewall policy or public-network restrictions, not from authorisation.
-
The workload's principal cannot be determined unambiguously.
-
Recovery would require subscription-wide access or a role broader than the approved data-plane action.
Fixed? Get the next one before it hits you: The KBY Brief
Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.
About this page
Credited to
Dates
Published
Last updated
Corrections
No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Sources
Based on the vendor sources listed below. Check each step against your environment before acting.
First published 21 August 2026 · Last updated 16 November 2026
REST API error codes for Azure Key Vault
Cited for: Key Vault 403 causes including insufficient permission and firewall restrictions.
Azure role-based access control for Key Vault
Cited for: Key Vault data-plane RBAC roles, scopes, and role-assignment practices.
Troubleshooting Azure Key Vault access issues
Cited for: Identity, access policy, RBAC, and diagnostic logging checks for vault access failures.