Delete storage account

Amit Modi 40 Reputation points Microsoft Employee
2026-05-22T12:21:50.9433333+00:00

Is there any way to delete a storage account where the immutable policy for container is 180/730 days(date not yet passed) and policy is locked?

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.


Answer accepted by question author
Thanmayi Godithi 11,905 Reputation points Microsoft External Staff Moderator
2026-05-22T13:52:20.5366667+00:00

Hi Amit Modi ,

No, it is not possible to delete a storage account if a container has a locked immutability policy (for example 180/730 days) and the retention period has not yet expired.

When an immutability policy is in a locked state, it enforces a WORM (Write Once, Read Many) condition. During this period, the data cannot be modified or deleted by any user, including administrators. [learn.microsoft.com]

Additionally, if there are blobs within a container protected by a locked time-based retention policy, deletion of the container and the storage account is blocked until the retention period completes. [learn.microsoft.com]

It is important to note that once a policy is locked:

  • It cannot be removed or reduced, only extended
  • There is no supported workaround or override to bypass this restriction

Resolution / Next Steps:

  • You must wait until the retention period expires
  • After expiry, delete the blobs → container → storage account

For more details, refer to official documentation:

Let me know if you need further assistance on this issue.

Was this answer helpful?

2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-05-22T12:22:05.5533333+00:00

    A storage account that contains a container with a locked, active container-level immutable (WORM) policy and non-empty blobs cannot be deleted until the protected data is removed in accordance with the policy.

    From the documented scenarios for container-level WORM:

    • When a container is protected by an active time-based retention policy (and/or legal hold):
      • Delete Blob operations are prohibited.
      • Container deletion fails if a container-level WORM policy is in effect.
      • Storage account deletion fails if there's a container with at least one blob present.
    • When the container’s time-based retention policy is expired and no legal hold is in effect:
      • Delete operations on blobs are allowed, but overwrites are not.
      • Container deletion still fails if at least one blob exists in the container, regardless of whether the policy is locked or unlocked.
      • Storage account deletion fails if there is at least one container with a locked time-based retention policy. Unlocked policies don't provide delete protection.

    For a locked policy with 180/730 days not yet passed:

    1. The policy cannot be deleted or shortened.
    2. Blobs under protection cannot be deleted until the retention period expires.
    3. The container cannot be deleted while the policy is in effect and blobs exist.
    4. The storage account cannot be deleted while such a container with blobs exists.

    Therefore, there is no supported way to delete the storage account until:

    • The retention period has expired, and
    • All blobs in the WORM-protected container are deleted, and
    • The container itself is deleted (or otherwise no longer protected in a way that blocks account deletion).

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.