I cannort delete Azure Ai Aserivces resource

Uri Zeira 20 Reputation points
2024-07-29T12:17:43.6633333+00:00

I am trying to delete an Azure Ai Service and I am getting this error:

Failed to delete resource /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxx and underlying user data.

Any idea how to delete it?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,903 questions
0 comments No comments
{count} votes

Accepted answer
  1. Deepanshukatara-6769 10,300 Reputation points
    2024-07-30T08:54:48.79+00:00

    Hi ,

    Issue --> cannort delete Azure Ai Aserivces resource and getting this error:

    Failed to delete resource /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxx/providers/Microsoft.CognitiveServices/accounts/xxxxxxxx and underlying user data.

    Solution-->Try to delete the resource group from the CLI and got a detailed error saying "Could not delete account since it contains 2 deployment(s)." Once deleted the deployments user was able to delete the resource group

    Kindly accept if it works

    Thanks
    Deepanshu

    1 person found this answer helpful.
    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Deepanshukatara-6769 10,300 Reputation points
    2024-07-29T12:42:55.95+00:00

    Hi Uri, Welcome to MS Q&A

    If you want to remove an Azure AI services resource , you can delete the resource or resource group. Deleting the resource group also deletes any other resources associated with it. You can't delete your resource directly from Vision Studio, so use one of the following methods:

    If you want to clean up and remove an Azure AI services subscription, you can delete the resource or resource group.

    • In the Azure portal, expand the menu on the left side to open the menu of services, and choose Resource Groups to display the list of your resource groups.
    • Locate the resource group containing the resource to be deleted.
    • If you want to delete the entire resource group, select the resource group name. On the next page, Select Delete resource group, and confirm.
    • If you want to delete only the Azure AI services resource, select the resource group to see all the resources within it. On the next page, select the resource that you want to delete, select the ellipsis menu for that row, and select Delete.

    Regarding the models that are still present in Vision Studio, it's possible that they were not deleted properly from the Azure portal. Can you please confirm if you followed the above steps to delete the resources?

    Do let me know if that helps or have any further queries

    Kindly accept if it helps

    Please let me know if further questions

    Thanks

    Deepanshu


  2. VasaviLankipalle-MSFT 17,641 Reputation points
    2024-07-29T23:59:56.0066667+00:00

    Hello @Uri Zeira , Thanks for using Microsoft Q&A Platform.

    Make sure you have the Cognitive Services Contributor role-based access control assigned to your resource in the Azure portal. This lets you create, read, update, delete and manage keys of Cognitive Services.

    To delete the resource, you can try purging the deleted resource. Once a resource is purged, it is permanently deleted and cannot be restored. You will lose all data and keys associated with the resource.

    I hope this helps.

    Regards,

    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    0 comments No comments

  3. Uri Zeira 20 Reputation points
    2024-07-30T08:45:46.2733333+00:00

    I found the problem. I tired to delete the resource group from the CLI and got a detailed error saying "Could not delete account since it contains 2 deployment(s)." Once I've deleted the deployments I was able to delete the resource group


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.