Hello,
Welcome to Microsoft Q&A,
Step 1: Check for Resource Locks
Locked resources prevent modifications or deletions.
- List locks
Get-AzResourceLock -ResourceGroupName "<ResourceGroupName>"
- If a lock exists, remove it:
Remove-AzResourceLock -LockId "<LockId>"
Step 2: Identify Dependencies
Bindings, custom domains, or other configurations may reference public key certificates.
- List all SSL bindings for the app:
az webapp config ssl list --resource-group <ResourceGroupName> --name <AppName>
- If the certificate is bound to a hostname, remove the binding:
az webapp config hostname delete --resource-group <ResourceGroupName> --webapp-name <AppName> --hostname <Hostname>
Step 3: Force Certificate Deletion
If the certificate is not bound or locks are removed, but it still cannot be deleted, force deletion might be necessary.
az webapp config ssl delete --certificate-thumbprint <Thumbprint> --resource-group <ResourceGroupName>
Please Upvote and accept the answer if it helps.
AI-assisted (Chat-GPT) creation and manually validated.