How to delete Azure subscriptions and tenants

Case #

You need to delete an existing Azure subscription or delete an existing Azure tenant.

Solution #

How to delete Azure subscriptions #

The only subscription types that you can manually delete are free trial and pay-as-you-go subscriptions. All other subscription types are deleted only through the subscription cancellation process. In other words, you can't delete a subscription directly unless it's a free trial or pay-as-you-go subscription. However, after you cancel a subscription, you can create an Azure support request to ask to have the subscription deleted immediately.

To view subscriptions for which you have billing access (this is a subset of the group of subscriptions for which you have access to manage Azure resources), navigate to the following link:

https://portal.azure.com/#blade/Microsoft_Azure_Billing/BillingMenuBlade/Subscriptions/id/dad78618-5b5e-43b7-a80b-a5f405486df5/openSubscriptionsBlade/true

To view subscriptions for which you have access to manage Azure resources (this is a superset of the group of subscriptions for which you have billing access), navigate to the following link:

https://portal.azure.com/#blade/Microsoft_Azure_Billing/SubscriptionsBlade

To cancel an Azure subscription, open the subscription blade and click "Overview". Here you should find the option to "Cancel subscription".

Cancel subscription

Before a subscription can be cancelled and deleted, the following requirements must be met:

  • You must have RBAC permissions to delete the subscription (subscription owner).
  • All subscription resource groups and resources must be deleted.

After the subscription is cancelled, billing is stopped immediately. However, it can take up to 10 minutes for the cancellation to show in the portal. If you cancel in the middle of a billing period, Microsoft will send the final invoice on your typical invoice date after the period ends. After you cancel, your services are disabled. That means your virtual machines are de-allocated, temporary IP addresses are freed, and storage is read-only. After your subscription is canceled, Microsoft waits 30 - 90 days before permanently deleting your data in case you need to access it or you change your mind. Microsoft does not charge you for keeping the data.

How to delete Azure tenants #

When an Azure AD organization (tenant) is deleted, all resources that are contained in the organization are also deleted. Prepare your organization by minimizing its associated resources before you delete. Only an Azure Active Directory (Azure AD) global administrator can delete an Azure AD organization from the portal.

Before an Azure tenant can be deleted, the following requirements must be met:

  • There can be no users in the Azure AD tenant except one global administrator who is to delete the organization. Any other users must be deleted before the organization can be deleted. If users are synchronized from on-premises, then sync must first be turned off, and the users must be deleted in the cloud organization using the Azure portal or Azure PowerShell cmdlets.
  • There can be no applications in the organization. Any applications must be removed before the organization can be deleted.
  • There can be no multi-factor authentication providers linked to the organization.
  • There can be no subscriptions for any Microsoft Online Services such as Microsoft Azure, Microsoft 365, or Azure AD Premium associated with the organization. For example, if a default Azure AD organization was created for you in Azure, you cannot delete this organization if your Azure subscription still relies on this organization for authentication. Similarly, you can't delete a organization if another user has associated a subscription with it.

In order to delete an Azure tenant, navigate to the Azure AD tenant overview blade at:

https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview

In the overview pane, click on "Manage Tenants".

Manage Tenants

Then tick the checkbox next to the Azure tenant you wish to delete and click Delete.

If all goes well, all checklist items should be green and you should be ready for the final tenant deletion. If any outstanding points are found, you will need to resolve all warnings before proceeding with the deletion.

Azure AD tenant deletion checks

Reasons why an Azure tenant cannot be deleted #

There are many reasons why you may not be able to delete your Azure tenant:

  • When you configured your Azure AD organization, you may have also activated license-based subscriptions for your organization like Azure AD Premium P2, Microsoft 365 subscriptions or Enterprise Mobility and Security (EMS) subscriptions. To avoid accidental data loss, you can't delete a organization until the subscriptions are fully deleted. The subscriptions must be in a Deprovisioned state to allow organization deletion. An Expired or Canceled subscription moves to the Disabled state, and the final stage is the Deprovisioned state.
  • You may have created a tenant via a self sign-up process or a Teams exploratory organization. In these cases, you should perform an admin takeover of the Microsoft 365 subscription and ensure that all resources and subscriptions of your tenant are cancelled before trying to delete your Azure AD tenant.
  • You may have one or more Azure trial subscriptions which block the Azure tenant deletion. For details on how to check the trial subscription status, consult the following article: https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto.
  • If you have a free MS Teams organization, follow instructions in the following article to remove it: https://support.microsoft.com/en-us/office/delete-your-teams-free-organization-2c28cfcf-3fbf-497c-938f-8815a8f6a6b9.
  • You may have enterprise apps which cannot be deleted. In this case, you should run the followign command from elevated Powershell prompt after you authenticate to the Azure tenant as a global administrator user:
Get-AzADServicePrincipal | ForEach-Object { Remove-AzADServicePrincipal -ObjectId $_.Id -Force}

Sources #

https://docs.microsoft.com/en-us/azure/cost-management-billing/manage/cancel-azure-subscription

https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/directory-delete-howto

Powered by BetterDocs