An Azure service that is used to automate, configure, and install updates across hybrid environments.
Hello jan pawel,
Greetings!
Thanks for raising this question in Q&A forum.
Don't worry you're not alone in this situation and it's actually a very understandable mistake! Here's what's happening: Azure soft-deletes Automation accounts for up to 14 days after you delete them. During this time, the service still counts that deleted account against your regional quota of one Automation account per subscription per region. So even though you restored the account, the deployment is still seeing a conflict — likely because there is either a ghost of the old deleted account still lingering in the system, or the restored account hasn't fully propagated yet in the backend.
Here's how to get yourself unstuck step by step:
Step 1: Check for Lingering Soft-Deleted Accounts
First, let's see exactly what's sitting in your subscription. Open the Azure Portal → Automation Accounts, click Filters at the top, and enable "Show deleted". This will reveal any soft-deleted accounts that are still counting against your quota alongside your restored one.
You can also check via PowerShell for a clearer picture:
Get-AzAutomationAccount -SubscriptionId <your-sub-id>
Get-AzAutomationDeletedAccount -SubscriptionId <your-sub-id>
Step 2: Remove Any Extra or Duplicate Soft-Deleted Account
If you see more than one account in that region (either live or in deleted state), remove the unwanted one using PowerShell:
Remove-AzAutomationDeletedAccount `
-Name <AccountName> `
-ResourceGroupName <ResourceGroupName> `
-Force
Wait a few minutes after running this to allow the quota to update on the backend.
Step 3: Confirm Your Restored Account Is Fully Active
Go to the Azure Portal → Automation Accounts and open your restored account. Make sure its status shows as "Active" not "Restoring" or any transitional state. Sometimes the restore completes visually in the portal before it's fully live in the backend.
Step 4: Try Restoring via PowerShell if Portal Restore Seems Incomplete
If you're not fully confident the portal restore worked properly, try running the restore command via PowerShell as it is often more reliable:
Restore-AzAutomationDeletedAccount `
-Name <YourAccountName> `
-ResourceGroupName <YourResourceGroupName> `
-Location <YourRegion>
Step 5: Wait a Few Minutes Then Re-Run Your Deployment
After cleaning up duplicates and confirming only one active Automation account exists in that region, wait about 5 minutes for quota propagation, then re-run your failed deployment. Point it to the restored account and the "Only one account is allowed" error should no longer appear.
Step 6: If the Error Still Persists, Escalate to Azure Support
If after all these steps the same error continues, this may be a backend propagation bug that needs the Azure Automation product team to manually clear the quota state. Open an Azure Support Request and include your Subscription ID, region, the correlation ID from the failed deployment error, and a screenshot of the Automation Accounts blade with "Show deleted" enabled.
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.