Hi @shirure param , how are you adding the key? Make sure you have the correct permissions. You need to have the "Key Management" role or the "Owner" role to add keys.
uanble to add keys in key vault
Caller needs data action: 'Microsoft.KeyVault/vaults/keys/read' to perform action on resource: /subscriptions/8b36142b-c901-4202-89b7-89d1f7b06934/resourceGroups/reg-0-1/providers/Microsoft.KeyVault/vaults/pakey. For more information, please see: https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide
2 answers
Sort by: Most helpful
-
James Hamil 25,396 Reputation points Microsoft Employee
2024-08-08T21:11:46.6933333+00:00 -
Marilee Turscak-MSFT 36,871 Reputation points Microsoft Employee
2024-08-08T21:17:11.8566667+00:00 Hi @shirure param ,
The user adding the keys needs to have the permission:
'Microsoft.KeyVault/vaults/keys/read'
Please assign the Key Vault Reader role to the user, or add the custom role with the permissions above.
If you have trouble adding the role itself, please confirm that you have been assigned the role as "Owner" for the subscription. Users need to have the "Owner" role assigned in order to change the permission model. https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide?tabs=azure-cli
If it's a service trying to access the keys, you need to make sure that the Key Vault access policies are configured correctly to allow that access.
If the information helped you, please Accept the answer. This will help us and improve searchability for others in the community who may be researching similar questions.