We’re implementing automated backups of our Azure Key Vault secrets and certificates to a Storage Account using a Logic App with managed identity. The backup operation consistently fails with a ‘403 Forbidden’ error when trying to write to the storage account.
Error: The client with object id 'xxxx-xxxx-xxxx' does not have authorization
to perform action 'Microsoft.Storage/storageAccounts/blobServices/write'
Status: 403 Forbidden
Code: AuthorizationPermissionMismatch
The Logic App’s managed identity has been assigned Storage Blob Data Contributor role at the storage account level. The Key Vault access policy grants the managed identity Get, List, and Backup permissions for secrets and certificates. Both resources are in the same subscription and region.
The complication is that our storage account has firewall rules enabled - it only allows access from specific VNets and our corporate IP ranges for security compliance. I suspect the managed identity is being blocked by the storage firewall, but I’m not sure how to configure storage account firewall rules to allow Key Vault managed identity access while maintaining our security posture.
Is there a way to configure the firewall to allow the managed identity for backup automation without opening up the storage account to all Azure services?