Azure Remove completely storage account with locked policy

Ganczarczyk, Marek 20 Reputation points
2025-02-18T17:40:31.4833333+00:00

I want to remove completely whole storage account currently it is not possible cause it isn't empty. This operation is not permitted as the blob is immutable due to a policy. "Blob Immutability Policy: deleting UntilDate on locked policy is not allowed" I need to remove this whole storage account or blobs with workaround.

$BlobProperties.ImmutabilityPolicy

ExpiresOn PolicyMode


3/8/2034 12:00:00 AM +00:00 Locked

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,439 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Naga Venkata Sai Vagdevi Poojitha Returi 75 Reputation points Microsoft External Staff
    2025-02-18T18:54:57.1033333+00:00

    Hello Ganczarczyk,

    Thank you for reaching out to Microsoft Q&A.
    You cannot delete a storage account with a locked immutable policy, Since the blob is locked until 2034, deletion will only be possible after this date. (3/8/2034 12:00:00 AM +00:00)

    Workaround:
    **1.**If you can create a new version of the blob with an overwrite operation (if versioning is enabled), you might be able to delete the previous version.
    2.Migrate to a New Storage Account & Retire the Old One

    If the data is no longer needed but deletion is blocked:

    • Create a new storage account and move active resources there.
    • Disable all access to the old storage account to prevent unnecessary costs.
    • Set a reminder for the expiration date (March 8, 2034) to delete it then.

    You cannot delete a storage account with a locked immutable policy, and Microsoft Support cannot override it. The only way to delete it is to wait for the policy to expire in 2034.

    If You find this information helpful, please do not forget to accept the answer.

    0 comments No comments

Your answer

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