Other Articles

Storage Account – Enable Blob Soft Delete

Secure Configuration Checks > Azure

This check ensures that blob soft delete is enabled for Azure Storage Accounts. When soft delete is enabled, deleted blobs and blob snapshots are kept for a set number of days, so they can be recovered if they are removed by mistake or by a malicious actor.

Check Details

  • Resource: Storage Account
  • Check: Enable Blob Soft Delete
  • Risk: If blob soft delete is disabled, blobs that are deleted or overwritten cannot be recovered, increasing the risk of permanent data loss from accidental deletion or malicious activity.

Remediation via Azure Portal

  1. Log in to the Azure Portal. Azure Portal dashboard
  2. Navigate to Storage accounts and select the affected storage account. Azure Storage Accounts list
  3. In the left menu, click on Data protection under Data management.
  4. In the Recovery section, select Enable soft delete for blobs and set Keep deleted blobs for (in days) to the number of days you want to retain deleted blobs (for example, 7). Blob soft delete enabled with retention days set
  5. Click Save to apply the changes.

Remediation via Azure CLI

  1. Open Azure Cloud Shell from the Azure Portal or use a local terminal with Azure CLI installed. Azure Cloud Shell
  2. Run the following command to enable blob soft delete:
    az storage account blob-service-properties update \
    --account-name <storage-account-name> \
    --resource-group <resource-group-name> \
    --enable-delete-retention true \
    --delete-retention-days <retention-days>
    

    Replace <storage-account-name>, <resource-group-name> and <retention-days> with your actual values. The retention period can be set between 1 and 365 days.

Updated on 03 November, 2026