Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hello @Snehansh Akhaury
Based on the behavior you've described, this doesn't look like a normal Azure Portal or CLI deletion problem.
The important details are HTTP 500 InternalServerError, and x-ms-failure-cause: service
The same deletion fails through the Azure Portal, Azure CLI, and the ARM REST API. That points toward Microsoft.CognitiveServices resource provider/backend rather than a client-side issue.
There are two different operations worth distinguishing here:
1. Delete an active AI Services/Cognitive Services account
az cognitiveservices account delete \
--name <account-name> \
--resource-group <resource-group>
This is the normal deletion operation for an existing Cognitive Services account.
2. Purge a soft-deleted account
Purge only applies after the account has successfully entered the deleted/soft-deleted state:
az cognitiveservices account list-deleted
and, if the account appears there:
az cognitiveservices account purge \
--name <account-name> \
--resource-group <resource-group> \
--location southindia
Account purge is specifically for a soft-deleted Cognitive Services account.
Therefore, don't repeatedly run purge against these resources unless list-deleted confirms they've actually transitioned into the soft-deleted collection.
One useful diagnostic would be:
az cognitiveservices account show \
-g <resource-group> \
-n <account-name> \
--query "{name:name,kind:kind,location:location,provisioningState:properties.provisioningState,id:id}"
followed by:
az cognitiveservices account list-deleted -o table
If the accounts still appear as active ARM resources but every DELETE immediately returns the same service-side HTTP 500, there's probably no customer-side hard-delete command that can bypass that backend condition.
Also check the resource and resource-group Locks and the resource group's Deployments blade, but a normal lock would generally result in an authorization/lock-related response rather than the service-side InternalServerError you're receiving.
Microsoft does expose a dedicated REST operation for permanently purging a deleted account:
DELETE .../providers/Microsoft.CognitiveServices/
locations/{location}/resourceGroups/{resourceGroup}/
deletedAccounts/{accountName}
But again, that's for a resource already in the deleted-account collection; it isn't a force-delete API for an active account whose normal DELETE operation is returning HTTP 500.
At this point, open an Azure Support request for Azure AI Services / Cognitive Services resource management and ask Microsoft to investigate the resource provider state for these three accounts.
Provide them privately with:
- Region: southindia
- Resource type: Microsoft.CognitiveServices/accounts
- Kind: AIServices
- Correlation ID: ffdcef0b-a4dd-4461-a734-f7b04dddae14
- HTTP status: 500 InternalServerError
- x-ms-failure-cause: service
- UTC timestamps of several failed DELETE attempts
- Full resource IDs of the three affected accounts
Specifically ask Microsoft to determine whether the accounts have orphaned backend dependencies/state preventing the resource provider from completing DELETE, and whether backend cleanup is required.
One security note: you've included your subscription ID and full resource IDs in the public Q&A post. Those aren't credentials, but there's generally no benefit to publishing them. Please edit the question and redact the subscription ID and full resource IDs, then provide them privately in the support case.
Also, clearly state that rg-simple-chat-app must not be touched. Support should target only the three affected Cognitive Services accounts and their specified resource groups.
References:
Azure CLI - Cognitive Services account delete/list-deleted/purge
Azure AI Services REST API - Delete account
Azure AI Services REST API — Purge deleted account
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.