Proposed Pull Request Change

title description services author ms.service ms.topic ms.date ms.author ms.devlang
Renew an Azure Application Gateway certificate Learn how to renew a certificate associated with an application gateway listener. application-gateway mbender-ms azure-application-gateway how-to 03/31/2025 mbender azurecli
📄 Document Links
GitHub View on GitHub Microsoft Learn View on Microsoft Learn
Content Truncation Detected
The generated rewrite appears to be incomplete.
Original lines: -
Output lines: -
Ratio: -
Raw New Markdown
Generating updated version of doc...
Rendered New Markdown
Generating updated version of doc...
+0 -0
+0 -0
--- title: Renew an Azure Application Gateway certificate description: Learn how to renew a certificate associated with an application gateway listener. services: application-gateway author: mbender-ms ms.service: azure-application-gateway ms.topic: how-to ms.date: 03/31/2025 ms.author: mbender ms.devlang: azurecli # Customer intent: As an IT administrator managing an Application Gateway, I want to renew SSL certificates seamlessly, so that I can ensure secure TLS/SSL encryption without incurring downtime for users. --- # Renew Application Gateway certificates At some point, you'll need to renew your certificates if you configured your application gateway for TLS/SSL encryption. When you renew an SSL certificate with a valid new certificate, this doesn't incur any downtime for the service. There are two locations where certificates may exist: certificates stored in Azure Key Vault, or certificates uploaded to an application gateway. ## Certificates on Azure Key Vault When Application Gateway is configured to use Key Vault certificates, its instances retrieve the certificate from Key Vault and install them locally for TLS termination. The instances poll Key Vault at four-hour intervals to retrieve a renewed version of the certificate if it exists. If an updated certificate is found, the TLS/SSL certificate that's currently associated with the HTTPS listener is automatically rotated. > [!TIP] > Any change to Application Gateway forces a check against Key Vault to see if any new versions of certificates are available. This includes, but is not limited to, changes to Frontend IP Configurations, Listeners, Rules, Backend Pools, Resource Tags, and more. If an updated certificate is found, the new certificate is immediately presented. Application Gateway uses a secret identifier in Key Vault to reference the certificates. For Azure PowerShell, the Azure CLI, or Azure Resource Manager, we strongly recommend that you use a secret identifier that doesn't specify a version. This way, Application Gateway automatically rotates the certificate if a newer version is available in your key vault. An example of a secret URI without a version is `https://myvault.vault.azure.net/secrets/mysecret/`. ## Certificates on an application gateway Application Gateway supports certificate upload without the need to configure Azure Key Vault. To renew the uploaded certificates, use the following steps for the Azure portal, Azure PowerShell, or Azure CLI. ### Azure portal To renew a listener certificate from the portal, navigate to your application gateway listeners. Select the listener that has a certificate that needs to be renewed, and then select **Renew or edit selected certificate**. :::image type="content" source="media/renew-certificate/ssl-cert.png" alt-text="Renew certificate"::: Upload your new PFX certificate, give it a name, type the password, and then select **Save**. ### Azure PowerShell [!INCLUDE [updated-for-az](~/reusable-content/ce-skilling/azure/includes/updated-for-az.md)] To renew your certificate using Azure PowerShell, use the following script: ```azurepowershell-interactive $appgw = Get-AzApplicationGateway ` -ResourceGroupName <ResourceGroup> ` -Name <AppGatewayName> $password = ConvertTo-SecureString ` -String "<password>" ` -Force ` -AsPlainText set-AzApplicationGatewaySSLCertificate -Name <oldcertname> ` -ApplicationGateway $appgw -CertificateFile <newcertPath> -Password $password Set-AzApplicationGateway -ApplicationGateway $appgw ``` ### Azure CLI ```azurecli-interactive az network application-gateway ssl-cert update \ -n "<CertName>" \ --gateway-name "<AppGatewayName>" \ -g "ResourceGroupName>" \ --cert-file <PathToCerFile> \ --cert-password "<password>" ``` ## Next steps To learn how to configure TLS Offloading with Azure Application Gateway, see [Configure TLS Offload](./create-ssl-portal.md).
Success! Branch created successfully. Create Pull Request on GitHub
Error: