Failed to delete the private endpoint. Error: Call to Microsoft.Storage/storageAccounts failed
Azure Backup locks the storage account when you configure protection for any file share in the corresponding account. This provides protection against accidental deletion of a storage account with backed-up file shares.
In my case, the Storage account I was attempting to remove the Private Endpoint from was an Azure File Sync storage account, that had Azure File Shares that were getting Backuped Up.
- Found and removed the lock on the storage account
- Then successfully delete the private endpoint
Generally, it is recommended that keep the lock taken on the storage account by Azure Backup. If you delete the lock, your storage account will be prone to accidental deletion and if it’s deleted, you’ll lose your snapshots or backups.