Remove Revert
To remove Revert, you delete the resource group you deployed it into. Because recovery points are protected by a locked immutability policy, and some objects Revert creates live outside the resource group, removal takes a few steps before and after that deletion.
Caution
Deleting the resource group permanently deletes every recovery point and report the deployment holds, along with everything else in the resource group. It cannot be undone. Export the recovery points you want to keep first.
Note
Removing the deployment does not cancel your Revert subscription. To end it, contact Vambris (sales@vambris.com).
What removing involves#
| What | Where it lives | How it is removed |
|---|---|---|
| Recovery points and reports | backups container in the data storage account |
You empty the container once the immutable window has passed, then delete the container itself |
| Dashboard, API, the jobs, Key Vault, storage accounts, alert rules, managed identities, and the private networking resources if you added them | The resource group | Deleting the resource group |
| The jobs' platform infrastructure | A second resource group Azure creates beside this deployment's | Normally deleted automatically together with the deployment's resource group |
| Log Analytics workspace | The resource group, unless you supplied your own | Deleted with the resource group; a workspace you supplied keeps its logs |
| Backup and restore app registrations | Each External ID tenant | Offboarding each tenant |
Dashboard sign-in app, Revert-WebUI (<web app name>) |
Workforce tenant | You delete it |
| Seven custom role definitions | Subscription | Usually with the resource group |
| Key Vault, after deletion | Soft-deleted in the subscription | Purged automatically after 90 days |
Before you begin#
You need:
- The Admin role in the dashboard, to export and to offboard tenants.
- Permission to delete the resource group, and to assign roles on the data storage account (Owner, or User Access Administrator plus Contributor).
- In the workforce tenant, permission to delete the app registration (an owner of the app, or a role such as Cloud Application Administrator).
- The Azure CLI in a Bash shell, for example Azure Cloud Shell.
Then, in this order:
- Export the recovery points you want to keep. Configuration > Export > Export recovery points copies every recovery point, report and manifest for all tenants to a storage account you own. See Export recovery points.
- Offboard every tenant. On Tenants, select Offboard… on each tenant's row. Offboarding deletes the backup and restore app registrations Revert created in that External ID tenant, disables the tenant's certificates and stops new recovery points. Deleting the resource group cannot reach those applications, and the restore application holds write permissions in your directory, so do not leave it behind. See Offboard a tenant.
- Wait until the newest recovery point is older than its immutable window. Until then, Azure refuses to delete it, for anyone, including a subscription Owner. The window is shown under Configuration > Protection > Deletion protection. To check a recovery point, open it from Recovery points: its Deletion protection field shows Window ended once its files are past the window. Reports added later by a comparison or a restore keep their own window from when they were written. An Admin can raise the window but nobody can lower it, so every raise lengthens this wait. See Protect recovery points from deletion.
Empty the backups container#
Azure does not delete a storage account while its immutability-enabled backups
container holds any blob or blob version, even one whose window has ended. If you delete
the resource group first, the deletion fails on the data storage account with
AccountProtectedFromDeletion ("The container(s) backups have object level immutability
enabled.") and leaves the resource group behind with the account in it. Empty the
container first.
The data storage account is the one named in the deployment output
storageAccountName, which holds the backups container, not the storage account the
Function App uses for its own state.
If the deployment uses private networking, the data storage account refuses public network access. Enable public network access on it for this procedure, or run the commands from a machine inside the virtual network.
Assign yourself Storage Blob Data Owner on the data storage account. Storage Blob Data Contributor is not enough: it deletes the current blobs but is refused on their previous versions with
OperationNotAllowedOnAutomaticSnapshot.acct=<data storage account> az role assignment create --role "Storage Blob Data Owner" --assignee <your sign-in name> \ --scope "$(az storage account show -n $acct --query id -o tsv)"Wait a minute or two for the role assignment to take effect.
Delete every blob and blob version in the container. Deleting a current blob leaves its previous version behind, so one pass is not enough:
az storage blob list --account-name $acct --container-name backups --include v \ --auth-mode login --query "[].[name,versionId]" -o tsv | while IFS=$'\t' read -r name ver; do az storage blob delete --account-name $acct --container-name backups --name "$name" \ ${ver:+--version-id "$ver"} --auth-mode login >/dev/null doneCount what is left:
az storage blob list --account-name $acct --container-name backups --include v --auth-mode login -o tsv | wc -lRepeat steps 4 and 5 until the count is
0. A version whose immutable window has not ended is refused with an HTTP 409. That is the protection working: come back when its window has ended.
Delete the backups container#
An empty backups container still keeps the storage account protected: object-level
immutability only has to be turned on for the container, whether or not anything is left
inside it, for deleting the resource group to fail with AccountProtectedFromDeletion
again. Delete the container itself, not just its contents, before you delete the
resource group.
Delete the container:
az storage container delete --account-name $acct --name backups --auth-mode loginConfirm it is gone:
az storage container exists --account-name $acct --name backups --auth-mode loginThis should report
false. If the delete was refused instead, a blob version inside the container is still inside its immutable window; repeat Empty the backups container and try again once its window has ended.
A blob or version that blob soft delete kept after you deleted it in the previous step does not stand in the way here: soft delete protects individual blobs so you can recover them, not the container, so it has no say over whether the container itself can be deleted. Only a version still inside its own immutable window does, the same check as every blob delete above.
Delete the resource group#
Warning
Deleting the resource group deletes everything in it, including any resources unrelated to Revert. Revert should have been deployed into a new, empty resource group; check what else is in it before you continue.
In the Azure portal, open the resource group and select Delete resource group, or run:
az group delete --name <resource-group>If the deletion fails with
AccountProtectedFromDeletion, either thebackupscontainer still holds a blob or version, or it was emptied but not yet deleted itself. Finish emptying it and deleting it, then delete the resource group again. See Deleting the resource group fails withAccountProtectedFromDeletion.Azure created a second resource group beside this one, holding the jobs' platform infrastructure, named after this deployment's own. Deleting this deployment's resource group normally deletes it too; if it is still listed afterward, delete it as well.
Remove what is left behind#
The dashboard sign-in app#
Setup created the app registration Revert-WebUI (<web app name>) in the workforce
tenant that holds the subscription, where <web app name> is the deployment's Function
App name. Deleting the resource group does not remove it. In the Microsoft Entra admin
center for the workforce tenant, open App registrations, select the app and select
Delete. Microsoft Entra ID keeps a deleted app registration restorable for 30 days.
Setup also created enterprise applications (service principals) in the workforce tenant for Vambris's setup sign-in application and its licensing application. If no other Revert deployment uses the tenant, you can delete them under Enterprise applications.
Enterprise applications in your External ID tenants#
Offboarding does not delete the enterprise application Revert-WebUI (<web app name>)
that an administrator of each External ID tenant consented to during onboarding, or its
consented permissions. In each External ID tenant you onboarded, open Enterprise
applications, select it and delete it.
Custom role definitions#
The deployment creates seven custom role definitions in the subscription. Deleting the resource group normally removes them, but Azure can keep listing them for a while afterwards. If one is still listed a day later, follow Custom role definitions left behind after a teardown.
The soft-deleted Key Vault#
Deleting the resource group soft-deletes the Key Vault. Purge protection means nobody can purge it early; Azure purges it automatically 90 days after deletion. Once every tenant is offboarded, the certificates in it no longer belong to any application. Until the purge, the vault's name stays reserved, so deploying Revert again with the same Resource name prefix into a resource group with the same name can collide with it. See Deployment fails because the Key Vault name is already in use.
Role assignments you made outside the resource group#
If you granted the jobs identity access to resources outside the resource group, such as Storage Blob Data Contributor on an export destination or Network Contributor on your own virtual network, those assignments remain and now refer to an identity that no longer exists. Remove them under each resource's Access control (IAM) > Role assignments.
Your own virtual network#
If this deployment ran on subnets of a virtual network you already had, deleting the resource group removes everything Revert added there: the private endpoints (if you turned on private networking) and, with them, the private DNS zone links. Revert never changed a subnet's own delegation, size or policies, and never attached a NAT gateway to your network, so there is nothing of Revert's left in it to clean up.
Activity Log routing you added#
If you routed the Activity Log to a workspace as described in Monitoring and alerts, that diagnostic setting is at subscription scope and remains. If nothing else uses it, remove it:
az monitor diagnostic-settings subscription delete --name rvt-activity
Also delete any alert rules you created outside the resource group.
Verify#
az group exists --name <resource-group>returnsfalse.- In each External ID tenant, App registrations no longer lists Revert-Backup-ReadOnly or Revert-Restore-ReadWrite.
- In the workforce tenant, App registrations no longer lists
Revert-WebUI (<web app name>). - A day after the deletion, the role definition list in Custom role definitions left behind after a teardown shows no definitions with the deployment's suffix.
az keyvault list-deleted -o tablelists the deployment's vault with its scheduled purge date. That is expected until the purge.
