Skip to content

Commit bc9e5e5

Browse files
Update troubleshoot-azure-app-service-certificates.md
1 parent 65558a8 commit bc9e5e5

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

support/azure/app-service/troubleshoot-azure-app-service-certificates.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Check the status of your App Service certificate to determine whether it's valid
4747

4848
**For Azure portal**
4949

50-
- Navigate to **App Service Certificates**, and select your certificate. Check the **Status** field. The value should be **Issued**, not **Expired** or **Pending Issuance**. Also note the **Expiration Date** and whether **Auto Renew** is enabled. In the portal, you can find **Auto Renew** under **Certificate Configuration** > **Auto Renew Settings**. Make sure that it's set to **On** if you expect Azure to renew the certificate automatically because the last validation occurred within 13 months (395 days).
50+
- Navigate to **App Service Certificates**, and select your certificate. Check the **Status** field. The value should be **Issued**, not **Expired** or **Pending Issuance**. Also note the **Expiration Date** and whether **Auto Renew** is enabled. In the portal, you can find **Auto Renew** under **Certificate Configuration** > **Auto Renew Settings**. Make sure that it's set to **On** if you expect Azure to renew the certificate automatically when the last validation occurred within the previous 13 months (395 days). Otherwise a new validation that you still own the domain is needed.
5151

5252
**For Azure CLI**
5353

@@ -77,7 +77,7 @@ az webapp config ssl show --resource-group <ResourceGroupName>
7777

7878
Make sure that the certificate isn't expired. Also, check whether the renewal status is healthy (no pending domain verification or errors).
7979

80-
If the certificate is marked **Expired** or you see a warning such as **Renewal Failed** in the portal, the certificate wasn't renewed in time and a new certificate should be purchased. If the status is **Pending Issuance**, the certificate isn't yet fully provisioned. This condition is often true because of domain verification issues.
80+
If the certificate is marked **Expired** or you see a warning such as **Renewal Failed** in the portal, the certificate wasn't renewed in time and a new certificate should be purchased. If the status is **Pending Issuance**, the certificate isn't yet fully provisioned. This condition is often true when additional verification if needed.
8181

8282
If **Auto Renew** is set to **Off**, and the certificate is expired, a new certificate should be created. In this case, you can delete this certificate. If **Auto Renew** is set to **On** but the certificate is still expired, this situation means that a validation requirement wasn't met on time. In this case, a new certificate should be created.
8383

@@ -153,16 +153,25 @@ out-of-band method to verify.
153153
An App Service certificate is stored [as a
154154
secret](/azure/key-vault/general/basic-concepts) in an Azure Key Vault that Azure creates or uses during certificate purchase. Problems that affect the Key Vault can prevent certificate usage or renewal.
155155

156-
**Common verifications**
156+
**Common verifications for Key Vault existence and status.**
157157

158-
- **Key Vault existence and status.** In the certificate's Azure portal
159-
page, in **Certificate Configuration > Step 1: Store**, verify that
160-
the certificate is correctly stored in a Key Vault (indicated by using a
161-
green checkmark). If it's not, you might have to select or create a Key Vault
162-
to store the certificate in. The Key Vault must be in the *same
163-
subscription and resource group** as the certificate.
158+
**For Azure portal**
159+
160+
In the certificate's Azure portal page, in **Certificate Configuration > Step 1: Store**, verify that the certificate is correctly stored in a Key Vault (indicated by using a green checkmark). If it's not, you might have to select or create a Key Vault to store the certificate in. The Key Vault must be in the *same subscription and resource group** as the certificate.
161+
162+
**For Azure CLI**
163+
164+
Use role-based access control (RBAC) for Key Vault verification with the following:
165+
166+
```powershell
167+
az role assignment create --role "Key Vault Certificate User" --assignee "f3c21649-0979-4721-ac85-b0216b2cf413" --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
168+
```
169+
170+
```powershell
171+
az role assignment create --role "Key Vault Certificate User" --assignee "abfa0a7c-a6b6-4736-8310-5855508787cd" --scope /subscriptions/{subscriptionid}/resourcegroups/{resource-group-name}/providers/Microsoft.KeyVault/vaults/{key-vault-name}
172+
```
164173

165-
- **Access policies.** The Key Vault must contain specific access
174+
**Access policies.** The Key Vault must contain specific access
166175
policies in order for App Service to be able to use the certificate. By default, when the
167176
certificate is created and stored, Azure adds two service principles
168177
that have the required permissions:
@@ -222,12 +231,7 @@ them by using Azure CLI, run az keyvault set-policy together with the appropriat
222231
**What to look for**
223232

224233
If the certificate was renewed in Key Vault but your app is still
225-
serving an expired certificate, either Key Vault permissions are missing or a sync is pending. The Azure portal might show a warning
226-
about Key Vault permissions in some cases. Refer to the certificate's
227-
**Key Vault Status** or the documentation's guidance about required
228-
policies. A missing policy can cause the app to keep using the old
229-
certificate. After you correct access issues and then sync, the app should use the new
230-
certificate.
234+
serving an expired certificate, the issue might be caused by missing Key Vault permissions, your network access is blocked, or a sync is pending. The Azure portal might show a warning about Key Vault permissions in some cases. Refer to the certificate's **Key Vault Status** or the documentation's guidance about required policies. A missing policy can cause the app to keep using the old certificate. After you correct access issues and then sync, the app should use the new certificate.
231235

232236
> [!IMPORTANT]
233237
> Don't delete or replace the Key Vault that holds your
@@ -345,7 +349,7 @@ error:
345349
### Step 5: Renew or reissue the certificate
346350

347351
During your troubleshooting in steps 1–4, if you discover that the
348-
certificate is about to expire and not automatically renew, you must take action to renew or reissue it.
352+
certificate is about to expire and didn't automatically renew, you must take action to renew or reissue it.
349353

350354
**Auto renewal versus manual renewal**
351355

0 commit comments

Comments
 (0)