An Azure backup service that provides built-in management at scale.
Hello @Koudelia Nikolai (Futurice)
Thanks for providing the detailed troubleshooting results.
Since you've already verified that the Recovery Services vault contains no visible backup items, registered infrastructure, soft-deleted items, private endpoints, or resource locks, I agree that repeating the standard vault cleanup steps is unlikely to help.
The important clue is the error: BMSUserErrorVaultDeletionNotAllowed
The deletion request still references: Sql;htfakturahotelldev-rg;htfhsqltest01
This suggests that Azure Backup still detects a SQL workload dependency, even though the corresponding resources aren't visible in the portal or your CLI queries.
Recommended next step
As the Microsoft moderator suggested, unregistering the SQL workload container is worth checking. However, since your earlier container-list commands returned empty results, first verify whether Azure PowerShell can discover the container.
Microsoft documents the following approach for retrieving SQL workload containers:
$vault = Get-AzRecoveryServicesVault `
-ResourceGroupName "<resource-group>" `
-Name "<vault-name>"
$containers = Get-AzRecoveryServicesBackupContainer `
-ContainerType AzureVMAppContainer `
-BackupManagementType AzureWorkload `
-VaultId $vault.ID
$containers | Format-List Name, FriendlyName, ContainerType
If the affected SQL container appears, confirm that all associated protected data has already been removed before unregistering it.
The following cmdlet for unregister an existing container:
Unregister-AzRecoveryServicesBackupContainer `
-Container $container `
-VaultId $vault.ID
Here, $container must be the specific container object selected and verified from the preceding query.
Important: Unregistering a backup container changes its registration with the Recovery Services vault. Before proceeding, confirm that no protected SQL databases or recovery points need to be retained.
If the container is not returned
If Azure PowerShell also returns no matching SQL workload container, but vault deletion continues reporting the same dependency, stop attempting additional deletion or cleanup commands.
At that point, the available evidence suggests a possible inconsistency between the vault's visible resources and the dependencies detected during deletion.
However, we cannot conclusively identify an orphaned backend registration without Microsoft investigating the service-side metadata.
Microsoft Support investigation
I recommend opening an Azure Backup support request and providing:
- Recovery Services vault name and resource ID.
- Error code: BMSUserErrorVaultDeletionNotAllowed.
- Referenced SQL workload: Sql;htfakturahotelldev-rg;htfhsqltest01.
- Results of the Azure CLI and PowerShell container queries.
- Failed deletion timestamp and correlation ID from the Azure Activity Log.
Ask Microsoft Support to verify whether a stale SQL workload registration or another internal dependency is preventing vault deletion.
I don't recommend bypassing the dependency checks through direct resource deletion requests or running automated vault cleanup scripts, particularly while the SQL registration state remains uncertain.
Could you confirm whether the Azure PowerShell query also returns no results, or whether it identifies the SQL workload container?
That distinction should help determine whether we can still use a documented unregistration procedure or whether Microsoft needs to investigate the remaining dependency.
Hope this helps narrow down the issue.
References:
- Delete a Recovery Services vault
- Get-AzRecoveryServicesBackupContainer
- Unregister-AzRecoveryServicesBackupContainer
- Troubleshoot SQL Server database backup in Azure
Help make this community better for everyone: If this answer helped or resolved your issue, please accept it or upvote it. If not, share more details in a comment so we can continue the discussion and find the right solution. Thank you.