RBAC KeyVault Certificate Reader granted to Web App but still has no access to KV SSL Certs

Richard Freytag 106 Reputation points
2025-10-30T23:09:57.5566667+00:00

I've granted my Web App RBAC roles: Key Vault Certificate Reader, Key Vault Secret Reader, and Key Vault Certificate Officer (just for debugging). I have configured the Key Vault firewall to let any of my managed services access. My certificates all work if I load them directly into my Web App. Every SSL certificate validates. But none of them can be added. I get the error ...

"The service does not have access to '/subscriptions/<GUID>/resourcegroups/<RESOURCE GROUP NAME>/providers/micxrosoft.keyvault/vaults/<NAME OF KEY VAULT>' Key Vault. Please make sure that you have granted necessary permissions to the service to perform the request operation."

I've looked at the docs and of course CoPilot and ChatGPT and I seem to have done the necessaries. What am I missing please?

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
{count} votes

2 answers

Sort by: Most helpful
  1. VEMULA SRISAI 3,010 Reputation points Microsoft External Staff Moderator
    2025-11-07T04:20:23.11+00:00

    Hello Richard Freytag,

    Could please select “Microsoft Azure App Service (Application)” as the member when assigning the Key Vault Certificate User role. This ensures App Service has the required permissions at the Key Vault level to read certificate details and complete the import process.

    After assigning the role, you should be able to add the certificate without any error. User's image

    Please let me know if you face any error after adding this role.

    0 comments No comments

  2. Sina Salam 26,661 Reputation points Volunteer Moderator
    2025-11-10T14:41:19.18+00:00

    Dear Richard Freytag,

    Carry out the below steps to resolve

    Step 1: Make sure the certificate is RSA or P-256. ECDSA (P-384, P-521) cannot be imported into App Service from Key Vault. Reference: - https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate

    Step 2: Use Azure CLI or Portal to assign Key Vault Certificate User role to the App Service global identity:

    az role assignment create \
      --role "Key Vault Certificate User" \
      --assignee "abfa0a7c-a6b6-4736-8310-5855508787cd" \
      --scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.KeyVault/vaults/<key-vault-name>"
    

    Reference: - https://learn.microsoft.com/en-us/azure/key-vault/general/rbac-guide

    Step 3: Azure Portal does not support RBAC-based certificate import for App Service. Use CLI:

    az webapp config ssl import \
      --name <app-name> \
      --resource-group <resource-group> \
      --key-vault <key-vault-name> \
      --key-vault-certificate-name <cert-name>
    

    Reference: - https://learn.microsoft.com/en-us/azure/app-service/configure-ssl-certificate

    Step 4: Ensure Key Vault allows:

    • Trusted Microsoft services
    • No private endpoint restrictions during testing

    Success.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.