What the error means
Each Azure resource group keeps a deployment history, and that history is limited to 800 deployments. DeploymentQuotaExceeded is the Azure Resource Manager error you get when a new deployment would take the history past that limit. Microsoft's common deployment errors table gives the fix: if you reach the limit of 800 deployments per resource group, delete deployments from the history that are no longer needed. The deployment-specific article describes the symptom as an error during deployment that states the current deployment will exceed the quota of 800 deployments.
This limit is about history records, not about resources. Microsoft states that deleting a deployment from the history doesn't affect any of the resources that were deployed. Pipelines that deploy to the same resource group many times a day, for example on every commit, are the usual way to reach 800.
Normally you would not see the error at all, because Azure Resource Manager automatically deletes deployments from your history as you near the limit. When the error does appear, it usually means something has stopped that automatic cleanup from working.
Common causes
Microsoft lists three reasons you can still hit the limit:
- A CanNotDelete lock on the resource group prevents deletions from the deployment history.
- You opted out of automatic deletions.
- A large number of deployments run concurrently and the automatic deletions aren't processed fast enough to reduce the total.
How to fix it
1. Check how many deployments are in the history
With Azure CLI in a Bash environment:
az deployment group list --resource-group exampleGroup --query "length(@)"With Azure PowerShell:
(Get-AzResourceGroupDeployment -ResourceGroupName exampleGroup).Count2. Delete a single deployment from the history
az deployment group delete --resource-group exampleGroup --name deploymentNameRemove-AzResourceGroupDeployment -ResourceGroupName exampleGroup -Name deploymentName3. Delete all history entries older than five days
Microsoft's Azure CLI example for Bash:
startdate=$(date +%F -d "-5days")
deployments=$(az deployment group list --resource-group exampleGroup --query "[?properties.timestamp<'$startdate'].name" --output tsv)
for deployment in $deployments
do
az deployment group delete --resource-group exampleGroup --name $deployment
doneAnd the PowerShell equivalent:
$deployments = Get-AzResourceGroupDeployment -ResourceGroupName exampleGroup | Where-Object -Property Timestamp -LT -Value ((Get-Date).AddDays(-5))
foreach ($deployment in $deployments) {
Remove-AzResourceGroupDeployment -ResourceGroupName exampleGroup -Name $deployment.DeploymentName
}4. Remove the blocker to automatic cleanup
If the resource group has a CanNotDelete lock, or you opted out of automatic deletions, Microsoft's "Automatic deletions from deployment history" article explains how to remove the lock or opt back in. Locking the critical resources individually rather than the whole resource group is covered in the guide to Azure resource locks. Then run the deployment again.
If nothing works
If many deployments run at the same time, the history can fill faster than automatic cleanup removes entries. As a general step, schedule a cleanup like step 3 in your pipeline before each deployment, or spread deployments across fewer, larger runs. If the error continues after the history is well below 800, capture the full error message and correlation ID for an Azure support request.
What we checked
Two Microsoft Learn pages were read. "Troubleshoot common Azure deployment errors" lists DeploymentQuotaExceeded with the 800-deployment mitigation. The article "Resolve error when deployment count exceeds 800" describes the limit, automatic deletions and the three reasons they may not prevent the error, and gives the Azure CLI and PowerShell commands to count and delete history entries; that article describes the error in words without printing the code, so it is not listed as a source with a quote. The error was not reproduced for this page.
Last checked: 2026-11-21.