Share via

How do we define/configure retention policy for storage account

Jiaming Pang 0 Reputation points
2026-02-26T22:45:46.6033333+00:00

How do we define/configure retention policy for storage account?

Azure Storage
Azure Storage

Globally unique resources that provide access to data management services and serve as the parent namespace for the services.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vallepu Venkateswarlu 6,130 Reputation points Microsoft External Staff Moderator
    2026-02-27T00:49:08.53+00:00

    Hi @ iaming Pang,

    Welcome to Microsoft Q&A Platform.

    Azure supports the following retention capabilities in Azure Storage Account.

    Blob soft delete (data recovery retention) : Blob soft delete enables recovery of deleted blobs and blob versions for a specified retention period. During this period, deleted data remains recoverable before permanent deletion.

    Ref: Enable and manage soft delete
    Soft delete for containers &&& Soft delete for blobs

    User's image

    Lifecycle management policies (automated retention and deletion): Lifecycle management policies allow you to automatically transition blobs to Cool or Archive tiers or delete them after a defined number of days based on creation or last modification time.

    Ref: Azure Blob Storage lifecycle management overview &&Configure a lifecycle management policy

    Immutable storage (WORM retention for compliance): Immutable blob storage provides Write Once, Read Many (WORM) protection. You can configure time-based retention policies or legal holds to prevent modification or deletion of blobs for a specified duration. This is used for regulatory and compliance scenarios.

    Ref: Store business-critical blob data with immutable storage in a write once, read many (WORM) state && Configure immutability policies for containers

    If the above steps did not help resolve your issue, please feel free to share the details in a private message so we can proceed with further troubleshooting over a Teams call. I am happy to connect with you on Teams to investigate and resolve the issue.

    Please210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

  2. Marcin Policht 82,685 Reputation points MVP Volunteer Moderator
    2026-02-26T22:59:11.9566667+00:00

    Azure Storage does not enforce a default time-based retention policy on active data. By default, blobs, files, queues, and tables are retained indefinitely as long as they are not explicitly deleted and the storage account remains active and billable. There is no automatic expiration or cleanup of content unless you configure it.

    Retention behavior in a storage account is controlled only when you explicitly enable features such as lifecycle management rules, soft delete retention, or immutable (WORM) policies. Lifecycle management allows you to define time-based rules for tiering or deleting data, soft delete enables recovery within a defined retention window after deletion, and immutable policies enforce regulatory retention periods during which data cannot be modified or deleted. Without these configurations, Azure Storage keeps data without time limits.

    If you want time-based control over how long data is kept, you must explicitly configure lifecycle management policies. Lifecycle management applies to Blob Storage and allows you to define rules based on blob properties such as age since creation or last modification. These rules can automatically transition data to cooler access tiers to reduce cost or permanently delete blobs and previous versions after a defined number of days. Lifecycle policies are flexible and support filtering by blob type, prefix, or tags, enabling granular retention strategies aligned with operational or cost requirements.

    Soft delete provides recoverability rather than true retention enforcement. When enabled, deleted blobs, blob versions, containers, or file shares are retained for a configurable number of days before being permanently removed. During this retention window, deleted data can be restored. After the retention period expires, the data is automatically and permanently deleted. Soft delete does not prevent deletion; it only delays permanent removal to protect against accidental or malicious deletes.

    Immutable storage, also known as WORM (write once, read many), is used for regulatory or compliance-driven retention. It allows you to define a time-based retention period at the container or object level during which data cannot be modified or deleted. Once a retention policy is locked, the retention period cannot be shortened, ensuring compliance with legal or regulatory requirements. Legal holds can also be applied to prevent deletion indefinitely until the hold is removed. Unlike lifecycle management, immutable policies enforce strict data preservation and override delete operations until the retention conditions are satisfied.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.