is it possible to sync key vaults certificate used in AppService with Azure Cli command?

Yini Wang 5 Reputation points
2023-03-15T08:32:42.43+00:00

Hi there,
I have a scenario where I will update the key vault certificates via powershell script and afterwards I want to sync the key vaults certificates used in AppService to new version. And I want to do the sync part also via code, for example via azure cli. Is that even possible? I checked the microsoft pages and didn't find any useful hints.

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.
1,115 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,874 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 16,011 Reputation points
    2023-03-17T22:36:24.4233333+00:00

    Hi @Yini Wang

    Thanks for the question.

    You can just run the same Create/Update Cert command as if you're reimporting the same cert. However, the bindings won't automatically be updated; you'll have to update bindings themselves as well. If you decide to manually sync the cert (regardless of client), the background job will skip updating the bindings and client certs info since the cert already has the latest version from KV, so it's important for you to make sure they update the bindings.

    hope that helps.


    If the information helped address your question, please Accept the answer. This will help us and also improve searchability for others in the community who might be researching similar information.