Unable to delete File share due to AzureBackupProtectionLock

EnterpriseArchitect 5,406 Reputation points
2023-12-01T05:02:59.3566667+00:00

I can't remove the outdated, inactive File Share from my Azure storage account. This share is impacted by a resource lock, according to the error. How can I securely remove the Azure File share?

I can see under the Settings | Lock there is

AzureBackupProtectionLock lock type Delete.

User's image

Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
266 questions
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,225 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Villa 285 Reputation points Microsoft Employee
    2023-12-04T07:12:53.7333333+00:00

    EnterpriseArchitect

    Thanks for reaching Microsoft Q&A Team.

    The storage account has an Azure Resource Manager lock that protects it from accidental deletion. Your storage account has a Read-only lock that prevents any changes or deletions to the resource.

    In order to delete the fileshare, you need to remove the lock first and then try to delete the Azure File Share.

    Note: You can always create the same lock again to protect your resource from accidental deletion. I recommend that you create the lock again after you delete the fileshare.

    The below articles explain more about Resource locking. https://learn.microsoft.com/en-us/azure/storage/common/lock-account-resource?tabs=portal

    Protect your Azure resources with a lock - Azure Resource Manager | Microsoft Learn

    Hope this helps. Please let us know if you have any further questions and we will be glad to assist you further. Thank you!

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


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.