Azure Web App and Key Vault Certificate

Adam Marshall 20 Reputation points
2025-04-27T21:44:16.9466667+00:00

I have multiple Windows web apps across multiple App Service plans, referencing a wildcard certificate in a Key Vault.

On the original web app that imported the certificate the first time, the web app picks up new certificates once they are expired and renewed.

In the custom domain, I can see the web app that does auto rotate expired certificates references the KeyVault certificate name, but the other web apps only reference the Thumbprint.

User's image

However, on the web apps that have manually referenced the certificate by the Thumbprint when binding (the cert cannot be "imported" again to the same App Service plan as the thumbprint cert already exists), then the keyvault rotation does not automatically update those web apps.

User's image

There doesn't appear to be any way to actually link these other web apps to use the "keyvault linked certificate'.

Why are these web apps not automatically updated to use the new certificate when it is uploaded into the Key Vault?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,769 questions
{count} votes

Accepted answer
  1. Silvia Wibowo 5,871 Reputation points Microsoft Employee Moderator
    2025-04-28T02:03:01+00:00

    Hi @Adam Marshall , I've simulated your situation:

    • Created a Basic App Service Plan.
    • Created two App Services into the same App Service Plan: mywebapp-598764321 and mywebapp-698754321.
    • Created a certificate in Azure Key Vault.
    • Assign RBAC in Azure Key Vault: Authorize App Service to read from the vault.
    • From mywebapp-598764321, added certificate from Azure Key Vault.
    • Didn't do anything from mywebapp-698754321, I could see the certificate from Key Vault already listed under Certificate - Bring Your Own Certificate.

    What I observed:

    1. Certificate is listed under each of the web app. Both web apps have exactly the same view of the certificate. The second web app (mywebapp-698754321) also has "Sync" button on the certificate detail.
    2. I tried creating a new version of the certificate and disable the old version. The web apps (mywebapp-598764321) did not pick up the new version automatically. I could click "Sync" from one web app (mywebapp-598764321 or mywebapp-698754321) and the other web app will pick up the new version of the certificate.
    3. App Service Plan does not have any setting on Certificate. You need to select the App Service to set the certificate.

    Is it possible for you to remove the certificate and add it again from one of the web apps? The other web apps using the same App Service Plan should pick it up automatically.

    Mentioning below steps by Adam Marshall followed by Silvia Wibowo response that worked

    I have migrated all of my production apps to use the Managed App Certificate, removed the wildcard cert from any staging slots and then deleted the previously imported Key vault cert.

    I then imported the key vault certificate again, and made the staging slots reference the newly imported Key Vault certificate.

    All the staging slots can see the key vault cert name and have the sync button.

    What a strange issue, the original Key vault certificate was imported over 3 years ago, so maybe there was an issue at that point that didn't make the reference properly.


0 additional answers

Sort by: Most helpful

Your answer

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