You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/azure/app-service/troubleshoot-azure-app-service-certificates.md
+21-17Lines changed: 21 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ Check the status of your App Service certificate to determine whether it's valid
47
47
48
48
**For Azure portal**
49
49
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.
51
51
52
52
**For Azure CLI**
53
53
@@ -77,7 +77,7 @@ az webapp config ssl show --resource-group <ResourceGroupName>
77
77
78
78
Make sure that the certificate isn't expired. Also, check whether the renewal status is healthy (no pending domain verification or errors).
79
79
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.
81
81
82
82
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.
83
83
@@ -153,16 +153,25 @@ out-of-band method to verify.
153
153
An App Service certificate is stored [as a
154
154
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.
155
155
156
-
**Common verifications**
156
+
**Common verifications for Key Vault existence and status.**
157
157
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
+
```
164
173
165
-
-**Access policies.** The Key Vault must contain specific access
174
+
**Access policies.** The Key Vault must contain specific access
166
175
policies in order for App Service to be able to use the certificate. By default, when the
167
176
certificate is created and stored, Azure adds two service principles
168
177
that have the required permissions:
@@ -222,12 +231,7 @@ them by using Azure CLI, run az keyvault set-policy together with the appropriat
222
231
**What to look for**
223
232
224
233
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.
231
235
232
236
> [!IMPORTANT]
233
237
> Don't delete or replace the Key Vault that holds your
@@ -345,7 +349,7 @@ error:
345
349
### Step 5: Renew or reissue the certificate
346
350
347
351
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.
0 commit comments