I want to permanently delete the Azure AI services that already have microsoft.cognitiveservices/accounts from the subscription Resources

Cream 0 Reputation points
2024-10-08T13:21:01.57+00:00

Hi

I want to permanently delete the Azure AI services that already have microsoft.cognitiveservices/accounts from the subscription Resources.

I want to delete because of the region I chose is not support and I want to delete the resource group since it's burning my credit right now. When ever I tried to delete the resource group, the error below appeared

Failed to delete resource group [resource group name]: Deletion of resource group '[resource group name]' failed as resources with identifiers 'Microsoft.CognitiveServices/accounts/[Azure AI Service name],Microsoft.CognitiveServices/accounts/[Azure AI Service name]' could not be deleted.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,278 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,370 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 24,591 Reputation points Microsoft Employee
    2024-10-08T14:33:37.89+00:00

    @Cream Thanks for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.

    I understand that you are unable to delete the Azure AI service account, and you are facing the issues.

    If you are facing the above error using the portal I would suggest you try deleting the AI Service Account using either the below PowerShell or AzCLI Cmdlets.

    PowerShell:

    Remove-AzCognitiveServicesAccount -ResourceGroupName <AIServiceAccountResourceGroupName> -name <AIServiceAccountName>
    

    Azure CLI Cmdlet:

    az cognitiveservices account delete --name <AIServiceAccountName> --resource-group <AIServiceAccountResourceGroupName>
    

    Refer to the cmdlet's documentation, Remove-AzCognitiveServicesAccount & az cognitiveservices account delete.

    Hope this helps, let me know if you have any further questions on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.