An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Hi @Drew Robson
Thank you for reaching out to Microsoft Q&A.
Check for soft-deleted instances
Azure API Management supports a soft-delete model. First see if the instances show up in the deleted list:
• REST API:
GET
https://management.azure.com/subscriptions/{subId}/providers/Microsoft.ApiManagement/deletedService?api-version=2022-12-01
• If they appear there, you can permanently purge them with:
DELETE
https://management.azure.com/subscriptions/{subId}/providers/Microsoft.ApiManagement/deletedService/{serviceName}?api-version=2022-12-01
Recover then delete
If you want to try a “recover” and then a clean delete:
• Recover soft-deleted instance:
POST
https://management.azure.com/subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.ApiManagement/restore/{serviceName}/recover?api-version=2022-12-01
• Once it’s back to an active state, delete it again through the portal or CLI:
az apim delete --name --resource-group --yes
Force-delete via PowerShell
You can also try the cmdlet below, which bypasses certain provisioning-state checks:
Remove-AzApiManagement -ResourceGroupName rg-tst-integration
-Name apim-int-tst-ae-01 `
-Force
and likewise for the prod instance.
Check for stuck operations
In Azure Portal → Activity log or via Resource Explorer, look for any ongoing update/backup/restore operations against these services. Cancel or wait for them to finish before retrying the delete.