An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
If the resource group still fails to delete after removing deployments and agents, the remaining blockers are usually one of these:
- Check the resource group Activity log first. This is the most direct way to find the exact resource or operation blocking deletion.
- In Azure portal, open the resource group.
- Select Activity log.
- Look for failed delete operations.
- Verify that the Foundry project itself is deleted, not only its deployments and agents.
- Deleting a resource group removes everything in it, but Foundry-related resources can still block deletion if the project or connected resources still exist.
- If the project was created in a shared resource group, delete the project first rather than deleting the whole resource group.
- Check for other remaining Foundry-related resources in the resource group.
Common blockers mentioned in the documentation include:
- deployed models
- connected tool resources
- the Foundry resource itself
- If the goal is to delete only the Foundry resource, do it from the resource group view:
- In Azure portal, go to Resource Groups.
- Open the resource group.
- Find the Foundry resource.
- Select the ellipsis for that row, then select Delete.
- If the goal is to delete the entire resource group:
- In Azure portal, go to Resource Groups.
- Open the target resource group.
- Select Delete resource group.
- If this still fails, the Activity log should identify the blocking resource.
- Check for non-Foundry blockers in the resource group.
Resource group deletion can also fail because of:
- resource dependencies
- resource locks
- subscription issues
- resources that must be deleted in a specific order
- If the Foundry/OpenAI resource still exists, delete it directly with PowerShell or Azure CLI.
Examples from the documentation: PowerShell:
Azure CLI:Remove-AzCognitiveServicesAccount -Name MyOpenAIResource -ResourceGroupName OAIResourceGroupaz cognitiveservices account delete \ --name <myResourceName> \ --resource-group <myResourceGroupName> - If a deployed model still exists, delete it explicitly with Azure CLI:
az cognitiveservices account deployment delete \ --name <myResourceName> \ --resource-group <myResourceGroupName> \ --deployment-name MyModel
Important warning: deleting a resource group permanently deletes every resource in it. Review the resource list before confirming deletion.
- Set up a Microsoft Foundry project in Visual Studio Code
- Work with Foundry agents and MCP server tools in Visual Studio Code (classic)
- Quickstart: Set up your first Foundry resource (azportal)
- Create and deploy an Azure OpenAI in Microsoft Foundry Models resource (classic) (cli)
- Create and deploy an Azure OpenAI in Azure AI Foundry Models resource (ps)
- Resource group deleting issue - Microsoft Q&A
- resource group in Deleting state for long time - Microsoft Q&A