An Azure backup service that provides built-in management at scale.
Thanks for sharing the details.
When attempting to Unregister “Workload in Azure VM” (SQL workload) from a Recovery Services vault, the Azure portal returns: “Microsoft Azure Backup encountered an internal error”
This occurs while preparing the VM / resource group for cross‑subscription migration, where Azure Backup resources must be removed first.
Based on the provided details:
- 7 SQL workload items and 14 VM backup items were stopped
- Backup data deletion was triggered, but:
- Backup items are in Soft‑Deleted state (
isScheduledForDeferredDelete = true) - DeleteBackupData failed for at least one SQL workload (e.g., msdb)
- Multiple failed backup / register jobs exist for the same VM
- Backup items are in Soft‑Deleted state (
- Soft Delete is enabled on the vault (14‑day retention)
Azure does NOT allow unregistering an AzureWorkload container (SQL / SAP workloads) if ANY of the following exist:
- Backup items in Soft‑Deleted state
- Failed DeleteBackupData jobs
- Failed or incomplete workload backup jobs
In this state, unregister is blocked and the portal surfaces a generic “Internal error”, which matches the screenshot.
As s resolution please try below workarounds:
Step 1 – Permanently purge backup data
You must ensure all workload and VM backup items are permanently deleted.
- Go to Recovery Services vault → Backup items
- For each SQL workload and VM backup item:
- Stop backup
- Delete backup data
- All DeleteBackupData jobs must complete successfully
ProtectionStopped is Not sufficient. Backup data must be permanently deleted.
Step 2 – Resolve Soft‑Delete blocking:
Because Soft Delete is enabled, the deleted items remain for 14 days and block unregister by design.
Choose one option:
- Option A (Immediate) Temporarily disable Soft Delete, then permanently purge all soft‑deleted items
- Option B (Passive) Wait until the 14‑day retention expires, after which items are auto‑purged
Reference: https://learn.microsoft.com/azure/backup/backup-azure-security-feature-cloud
Step 3 – Clear failed backup jobs:
Verify there are no failed or active jobs remaining:
- Recovery Services vault → Backup jobs
- Ensure DeleteBackupData, Register, and Backup jobs are not failed or in progress
Unregister is blocked until the vault job state is clean.
Step 4 – Unregister the AzureWorkload container
Once all backup data is permanently deleted and no failed jobs remain, unregister succeeds.
Azure CLI is recommended if the portal previously failed:
az backup container list </span>
--backup-management-type AzureWorkload </span>
--resource-group <VaultRG> </span>
--vault-name <VaultName>
az backup container unregister </span>
--backup-management-type AzureWorkload </span>
--container-name <ContainerName> </span>
--resource-group <VaultRG> </span>
--vault-name <VaultName>
- This error is expected Azure Backup behavior.
Unregistering a Workload in Azure VM fails with an internal error when backup data is soft‑deleted or deletion jobs have failed.
The fix is to permanently delete all workload and VM backups, purge soft‑deleted items (or wait for retention), clear failed jobs, and then unregister the workload container. Once these conditions are met, the operation succeeds.
Thanks,
Suchitra.