In the previous post, we showed how to configure the access policies to authorize data access to Azure Key Vault. This post describes RBAC, another permission model for key vault data access, that Microsoft has recommended since mid-2023.
Benefits of Using RBAC over Access Policies
The primary benefit of using RBAC instead of access policies is enhanced security, as it separates the security ops (granting data access) and admin tasks (managing the key vault). Per the official document:
When using the Access Policy permission model, a user with the Contributor, Key Vault Contributor, or any other role that includes
Microsoft.KeyVault/vaults/write permissionsfor the key vault management plane can grant themselves data plane access by setting a Key Vault access policy. To prevent unauthorized access and management of your key vaults, keys, secrets, and certificates, it’s essential to limit Contributor role access to key vaults under the Access Policy permission model. To mitigate this risk, we recommend you use the Role-Based Access Control (RBAC) permission model, which restricts permission management to the ‘Owner‘ and ‘User Access Administrator‘ roles, allowing a clear separation between security operations and administrative duties.
Other advantages of using RBAC include:
- Unified Access Model. RBAC provides a consistent access control model for all Azure services using the same APIs.
- Integration with Privileged Identity Management. RBAC rights are time-limited and expire automatically, enhancing security.
- Deny Assignments: Security principals’ access can be excluded at specific scopes.
You can determine the permission model when creating a new key vault, and it’s RBAC by default.

For existing key vaults, it can be changed via access configuration.

Roles for Key Vault Data Access
Based on Grant permission to applications to access an Azure key vault using Azure RBAC | Microsoft Learn, we compile the table below regarding the required IAM roles to access keys, secrets, and certificates in key vaults. In summary,
- If only read access is needed, grant the User role (e.g., Key Vault Secrets User)
- If read/write is needed, grant the Officer role (e.g., Key Vault Secrets Officer)
- The security ops person who assigns/removes key-vault-specific roles should have Key Vault Data Access Administrator role. You need User Access Administrator or Owner role to grant this role.
R: Read. R/W: Read/Write. ✅: Allowed. ⚠️: Allowed for metadata but not the content.
| Role | Key | Secret | Certificate | |||
|---|---|---|---|---|---|---|
| R | R/W | R | R/W | R | R/W | |
| Key Vault Administrator | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Key Vault Reader | ⚠️ | ⚠️ | ⚠️ | |||
| Key Vault Certificates Officer | ✅ | ✅ | ||||
| Key Vault Certificate User | ✅ | |||||
| Key Vault Crypto Officer | ✅ | ✅ | ||||
| Key Vault Crypto Service Encryption User | ⚠️ | (Wrap/Unwrap) | ||||
| Key Vault Crypto User | ✅ | (Crypto Ops*) | ||||
| Key Vault Crypto Service Release User | Release** | |||||
| Key Vault Secrets Officer | ✅ | ✅ | ||||
| Key Vault Secrets User | ✅ | |||||
| Key Vault Purge Operator | Allow permanent deletion of soft-deleted vaults | |||||
| Key Vault Data Access Administrator | Manage access to Azure Key Vault by adding or removing the above role assignments | |||||
| User Access Administrator or Owner | Manage user access to Azure resources | |||||
*Cryptographic operations on keys include: Decrypt, Encrypt, Wrap, Unwrap, Verify, Sign
**Release keys for Azure Confidential Computing
The migration guide also provides Access policy templates to Azure roles mapping.
Do I Need to Switch from Access Policy to RBAC for Existing Key Vaults?
The access policy model is still actively and widely used in enterprises. It has its own advantages, such as:
- Granular Control. You can assign individual permissions on keys, secrets, or certificates to the personnel.
- Simplicity. It’s native to Key Vault and does not need to create role assignments.
While migrating to RBAC is still encouraged to align with best practices for security, I don’t see the immediate urgency to switch to RBAC for the existing key vault, especially if you already have automated workflows based on the current model to provide key vault access. The described security risk is acceptable if your organization has good internal governance and compliance, or the admin team is small and highly trusted.
