When trying to delete Azure Resource Group in the Azure Portal I get an error pointing to a Storage Account which could not be deleted.
Indeed, trying to delete the Storage Account results in an error:
Failed to delete storage account 'clie6aa7aa53aa7ace414833'. Error: The storage account cannot be deleted due to its artifacts being in use. For more information on troubleshooting this issue, see https://azure.microsoft.com/documentation/articles/storage-cannot-delete-storage-account-container-vhd/
The article is not helpful, I have already deleted all blobs and files. There are no remaining containers on the SA:
When trying to delete from PowerShell I get:
PS C:\> Remove-AzureRmStorageAccount -ResourceGroupName myresourcegroupname001 -StorageAccountName cl
i6c4ccaf5d718f00c14833
Confirm
Remove Storage Account 'cli6c4ccaf5d718f00c14833' and all content in it
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
Remove-AzureRmStorageAccount : Operation returned an invalid status code 'Conflict'
At line:1 char:1
+ Remove-AzureRmStorageAccount -ResourceGroupName myresourcegroupname00 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Remove-AzureRmStorageAccount], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.RemoveAzureStorageAccountCommand
Currently I have two such undeletable, empty storage accounts - one of which remains for over 72 hours.
Is there anything I can do to delete this Storage Account?
I had the same problem that went on for several days. I was eventually able to resolve the problem by doing the following:
Afaik, this could happen when you delete the Virtual Machine, but there is a disk associated to it, an it creates an artifact under the disk tab.
As this article says https://redeploy.se/break-remove-lease-azure-blob/,
So it possibly can be a disk underneath a ARM, if all the articles about Storage Account troubleshooting aren't helpful, you can contact Azure support.
AFAIK It's a common error. Your vhd is in this storage account, that's why you can't remove it, without delete the vhd.
https://stackoverflow.com/a/10969013/1384539deleting
Solution: deleting the disks can be done via the previous version of the portal manage.windowsazure.com Virtual Machines -> Disks