Unable to delete storage account

Navab Shariff Shaik 0 Reputation points
2025-11-27T12:13:01.2233333+00:00

Few days back i tried to automate storage account replication from one storage account to another using github action

in my script i forget to give subscription id , so pipeline got in stuck , so i cancel the run and later i am trying to delete storage account from that time it unable to delete shows below error

Failed to delete storage account 'shariffsiaccount'. Error: An operation is currently performing on this storage account that requires exclusive access.

Tried all options nothing works

i created just for practice and learning please some one help me to delete account

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-27T12:13:11.6266667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    It seems that you're encountering an issue where the storage account cannot be deleted because an operation is currently in progress that requires exclusive access. Here are some steps you can take to resolve this issue:

    1. Check for Active Operations: Ensure that there are no ongoing operations on the storage account. This could include tasks like replication or any other processes that might be using the account.
    2. Wait for Operations to Complete: If there are operations in progress, you may need to wait for them to finish before attempting to delete the storage account again.
    3. Use Azure Portal: Try deleting the storage account directly from the Azure portal. Navigate to the storage account and select the Delete option.
    4. PowerShell or Azure CLI: If the portal doesn't work, you can try using PowerShell or Azure CLI commands to delete the storage account. Here are the commands:
      • PowerShell:
             Remove-AzStorageAccount -Name <storage-account> -ResourceGroupName <resource-group>  
        
      • Azure CLI:
             az storage account delete --name <storage-account> --resource-group <resource-group>  
        
      Make sure to replace <storage-account> and <resource-group> with your actual storage account name and resource group name.
    5. Troubleshoot Errors: If you continue to face issues, you can refer to Azure's troubleshooting documentation for guidance on resolving errors related to storage account deletion.

    If none of these steps work, you may need to contact Azure Support for further assistance.


    References:

    0 comments No comments

  2. Ravi Varma Mudduluru 3,550 Reputation points Microsoft External Staff Moderator
    2025-11-27T12:19:04.7433333+00:00

    Hello @Navab Shariff Shaik,

    Thanks for reaching out to Microsoft Q&A.

    It sounds like you're running into a pretty frustrating issue while trying to delete your storage account. The error message you're seeing about needing exclusive access typically indicates that there's an operation or resource lock preventing the deletion.

    Here are some steps you can try to resolve this:

    1. Check for Active Operations: Ensure there are no ongoing operations or resources associated with the storage account. Sometimes, background operations might keep the account locked.
    2. Wait a Bit: Occasionally, the storage account might take a little time to release resources after a failed operation. Waiting for a few minutes before trying again might help.
    3. Resource Locks: Check if there are any resource locks applied to your storage account that might be preventing deletion. You can find guidance on removing locks here.
    4. Immutability Policies: If the storage account has an immutability policy set up, it cannot be deleted until the policy's retention period expires. Learn more about immutability policies here.
    5. Use Azure Portal: If you're using the portal, navigate to your storage account, click Delete, and confirm that there are no prompts or additional locks still in place.
    6. Try PowerShell or CLI: If the portal fails, use the Azure PowerShell command:
         Remove-AzStorageAccount -Name <storage-account-name> -ResourceGroupName <resource-group-name>
      
      Or the Azure CLI command:
         az storage account delete --name <storage-account-name> --resource-group <resource-group-name>
      
    7. Diagnostics: Run the automated diagnostic tool for storage account deletion failures to get more insights into why the deletion might be failing.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

Your answer

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