Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hello Heiko Luxenhofer,
I understand you are dealing with a Cognitive Services resource stuck in the "Accepted" provisioning state, preventing you from deleting or modifying it.
This behavior typically occurs when the Azure Resource Manager (ARM) has received the request to create or update the resource but has lost synchronization with the underlying resource provider. Since "Accepted" is a non-terminal state, standard delete commands fail because Azure is waiting for the previous operation to finish.
These are few more common reasons for such scenarios:
- Backend service delays - Azure service experiencing high load or processing backlog
- Dependent resource conflicts - Another resource in the same hierarchy is blocking progress
- Name collision with soft-deleted resource - A previously deleted resource with the same name hasn't been purged yet (48-hour soft-delete period)
- Region capacity constraints - Insufficient capacity in the selected region
- Control plane API issues - Transient failures in Azure Resource Manager
- Azure AI Foundry hub dependency conflicts - Associated hub or workspace resources in inconsistent state.
Recommended Steps:
1: Attempt to "Refresh" the Resource State
Run the following Azure CLI command. This updates the tags to the same value, triggering a state refresh without changing configuration:
az resource update --ids <resource_id> --set tags.fix=stuck
Replace <resource_id> with the full Resource ID of your stuck Cognitive Service.
If this command succeeds, check if the Provisioning State has changed to "Succeeded" or "Failed". If it has, you can now delete the resource.
2: Use the Force Delete using Command
If the refresh doesn't work, try deleting the resource using the specific --no-wait flag. This tells the CLI not to wait for the operation to complete, which can sometimes bypass the client-side check for the terminal state.
az resource delete --ids <resource_id> --verbose --no-wait
3: Check for Management Locks
Ensure no hidden locks are preventing the operation, which can sometimes manifest as weird state behaviors.
az lock list --resource-group <your_resource_group>
If you see any locks, remove them using az lock delete.
4: Recover or purge deleted Microsoft Foundry resources
You can also try resolving the issue as suggested by community member by opening Microsoft Foundry (or the hub where your resource is deployed), purging any previously deleted resource groups, and allowing the system to update their status. Once the purge completes, the underlying resources will typically move into a “Failed” state, after which you should be able to delete them successfully.
Microsoft document for reference:
I hope this helps unlock your resource. If this answer resolves your issue, please click "Accept Answer" to help others in the community find this solution.