Unable to delete File share due to AzureBackupProtectionLock

EnterpriseArchitect 5,036 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.
240 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.
2,870 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Villa 280 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://video2.skills-academy.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.