Azure key vault Managed HSM not deleting and continuously charging.

Mohammad Mudassar 20 Reputation points
2026-06-19T17:28:39.76+00:00

I am beginner in Azure. Created a free trial account with 200$ free credits. I create Managed HSM service mistakenly. but it consumed 215$ in two days. not it schedule to purge on 24 june 2026 and continuously changing. How can i delete it or my Azure account to avoid more billing

Azure Dedicated HSM
Azure Dedicated HSM

An Azure service that provides hardware security module management.


Answer accepted by question author
Venkatesan S 10,830 Reputation points Microsoft External Staff Moderator
2026-06-19T18:48:00.19+00:00

Hi @Mohammad Mudassar

Thank you for reaching out in Microsoft Q&A forum,

I understand that you accidentally created an Azure Managed HSM and have observed significant consumption of your Azure free trial credits. Since Purge Protection is disabled on the Managed HSM, we recommend checking the current state of the resource and purging it if it is already in a deleted state.

If the Managed HSM is still active, please delete the resource first. If it has already been deleted and is currently in a soft-deleted state, you can permanently purge it using the Azure portal, Azure CLI, or Azure PowerShell. This will remove the resource from the deleted state rather than waiting for the scheduled purge date.

Afterward, we recommend reviewing Cost Management + Billing to monitor your subscription charges and confirm whether any additional costs are being incurred. If you no longer plan to use the Azure subscription, you may also delete any remaining resources and cancel the subscription to prevent future usage.

Please note that any charges already incurred before the resource is deleted or purged will not be automatically reversed.

Update:

Actually my subscription now is also become disable. When I purge the Managed HSM, it failed everytime. Now I am in a state where I can do nothing. I am worried about the changer because all my free credits already gone in two days. And bills increasing every hours. What should I do.

I understand your concern regarding the Managed HSM charges and the fact that your Free Trial subscription has already become disabled.

In a Free Trial subscription, Azure typically enforces a spending limit. Once the available credit is exhausted, the subscription is generally disabled rather than automatically transitioned to a paid subscription. Since your subscription is now disabled, this may be preventing you from successfully purging the Managed HSM resource.

At this point, I recommend opening a Billing Support request with Microsoft so that the support team can review the subscription status, verify whether any additional charges can accrue, and assist with the Managed HSM purge if required.

If you are unable to create a support request from the disabled subscription, you can use the following support portal:

https://azure.microsoft.com/support/create-ticket/

For additional information, please refer to the following Microsoft documentation:

Kindly let us know if the above helps or you need further assistance on this issue.

Please do not forget to 210246-screenshot-2021-12-10-121802.pngand “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

Was this answer helpful?

1 person found this answer helpful.

2 additional answers

Sort by: Newest
  1. TP 163.1K Reputation points Volunteer Moderator
    2026-06-19T18:43:07.8666667+00:00

    Hi,

    UPDATE: Considering your comment (excerpted below), in order to avoid charges I recommend you do NOT upgrade your Azure Free account to pay-as-you-go. I mentioned this before but I want to emphasize it again.

    @Mohammad Mudassar wrote:

    Actually my subscription now is also become disable. When I purge the Managed HSM, it failed everytime. Now I am in a state where I can do nothing. I am worried about the changer because all my free credits already gone in two days. And bills increasing every hours. What should I do.


    Did you purge your dedicated HSM? This is critical to stop future charges. To do this, navigate to below link in portal:

    https://portal.azure.com/#view/HubsExtension/BrowseResource.ReactView/resourceType/Microsoft.KeyVault%2FmanagedHSMs

    At the top, click Manage deleted HSMs, select your subscription, select your deleted HSM, click Purge, confirm. You should see at notification at top right confirming the purge succeeded.

    Note there is a delay between the time you purge the HSM and when charges stop accruing of several hours.

    I do not recommend you upgrade your Free Trial subscription to Pay-As-You-Go. I would let it be automatically disabled at the end of the 30 days, and then eventually automatically deleted. Under the terms of Azure Free you will not be charged (provided you do not upgrade to pay-as-you-go).

    Below is screenshot excerpt from Azure account FAQ (scroll down, #8):

    User's image

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-06-19T17:29:06.12+00:00

    Managed HSM uses mandatory soft-delete and (optionally) purge protection, which is why the HSM shows as scheduled to purge in the future and continues to incur charges while in the soft-deleted state.

    To stop further charges, the Managed HSM must be purged (permanently deleted). If purge protection is enabled, it cannot be disabled or overridden and the HSM cannot be purged until the retention period ends.

    Follow these steps:

    1. Check soft-delete and purge protection status
      • In the Azure portal:
        • Go to the Managed HSM resource.
        • Select Properties.
        • Review soft-delete and purge protection status.
      • Or with Azure CLI:
             az keyvault show --subscription <subscription-id> -g <resource-group> --hsm-name <hsm-name>
        
    2. If purge protection is NOT enabled
      • You can purge the HSM immediately using Azure CLI:
             az keyvault purge --subscription <subscription-id> --hsm-name <hsm-name> --location <location>
        
        This permanently deletes the HSM and stops further billing for that HSM.
    3. If purge protection IS enabled
      • No administrator or Microsoft can override purge protection. The HSM cannot be purged before the retention period ends.
      • The HSM will be purged automatically when the retention period ends; billing continues until that time.
    4. Ensure the resource group is deleted
      • In the Azure portal:
        • Go to Resource groups.
        • Select the resource group that contains the Managed HSM.
        • Select Delete resource group and confirm.
      • Deleting the resource group puts the HSM into soft-deleted state; you must still purge the HSM (step 2) to stop charges.
    5. If you want to cancel the subscription / account
      • Before canceling the subscription, delete/purge all resources (including the Managed HSM) as above.
      • Then cancel the subscription in the Azure portal as described in the subscription cancellation guidance.

    If purge protection is blocking purge and charges are significant, open a free Billing support request from the Azure portal so a billing engineer can review and assist with charges.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.