Hi Priyank.You can't delete a Recovery Services vault with any of the following dependencies:
- You can't delete a vault that contains protected data sources (for example, IaaS VMs, SQL databases, Azure file shares).
- You can't delete a vault that contains backup data. Once backup data is deleted, it will go into the soft deleted state.
- You can't delete a vault that contains backup data in the soft deleted state.
- You can't delete a vault that has registered storage accounts.If you try to delete the vault without removing the dependencies, you'll encounter one of the following error messages:
- Vault cannot be deleted as there are existing resources within the vault. Please ensure there are no backup items, protected servers, or backup management servers associated with this vault. Unregister the following containers associated with this vault before proceeding for deletion.
- Recovery Services vault cannot be deleted as there are backup items in soft deleted state in the vault. The soft deleted items are permanently deleted after 14 days of delete operation. Please try vault deletion after the backup items are permanently deleted and there is no item in soft deleted state left in the vault. For more information, see Soft delete for Azure Backup.
To delete a vault, follow these steps:
- Step 1: Go to vault Overview, click Delete, and then follow the instructions to complete the removal of Azure Backup and Azure Site Recovery items for vault deletion as shown below. Each link calls the respective blade to perform the corresponding vault deletion steps. See the instructions in the following steps to understand the process. Also, you can go to each blade to delete vaults. Alternately, go to the blades manually by following the steps below.
- Step 2: If Multi-User Authorization (MUA) is enabled, seek necessary permissions from the security administrator before vault deletion. Learn more
- Step 3: Disable the soft delete and Security features
- Go to Properties -> Security Settings and disable the Soft Delete feature if enabled. See how to disable soft delete.
- Go to Properties -> Security Settings and disable Security Features, if enabled. Learn more
- Step 4: Delete Cloud protected items
- Delete Items in soft-deleted state: After disabling soft delete, check if there are any items previously remaining in the soft deleted state. If there are items in soft deleted state, then you need to undelete and delete them again. Follow these steps to find soft delete items and permanently delete them.
- Go to the vault dashboard menu -> Backup Items. Click Stop Backup to stop the backups of all listed items, and then click Delete Backup Data to delete. Follow these steps to remove those items.
- Step 5: Delete Backup Servers
- Go to the vault dashboard menu > Backup Infrastructure > Protected Servers. In Protected Servers, select the server to unregister. To delete the vault, you must unregister all the servers. Right-click each protected server and select Unregister.
- MARS protected servers: Go to the vault dashboard menu -> Backup Infrastructure -> Protected Servers. If you've MARS protected servers, then all servers listed here must be deleted along with their backup data. Follow these steps to delete MARS protected servers.
- MABS or DPM management servers: Go to the vault dashboard menu > Backup Infrastructure > Backup Management Servers. If you've DPM or Azure Backup Server (MABS), then all items listed here must be deleted or unregistered along with their backup data. Follow these steps to delete the management servers. Note Deleting MARS/MABS/DPM servers also removes the corresponding backup items protected in the vault.
- Step 6: Unregister Storage Accounts Ensure all registered storage accounts are unregistered for successful vault deletion. Go to the vault dashboard menu > Backup Infrastructure > Storage Accounts. If you've storage accounts listed here, then you must unregister all of them. Learn more how to Unregister a storage account.
- Step 7: Remove Private Endpoints Ensure there are no Private endpoints created for the vault. Go to Vault dashboard menu > Private endpoint Connections under 'Settings' > if the vault has any Private endpoint connections created or attempted to be created, ensure they are removed before proceeding with vault delete.
- Step 8: Delete vault After you've completed these steps, you can continue to delete the vault. If you're still unable to delete the vault that contain no dependencies then follow the steps listed in deleting vault using Azure Resource Manager client.
Source - https://learn.microsoft.com/en-us/azure/backup/backup-azure-delete-vault?tabs=portalI hope this helps.Regards,BM