Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » AWS/Azure/OpenShift » Delete Azure Tenant: Remove Custom Domain from Entra ID
  • Upgrade veeam Backup and replication
    How to upgrade Veeam Backup and Replication 12.3 Backup
  • windows server
    How to backup and restore a Windows DHCP Server via the DHCP Manager and PowerShell Windows Server
  • Azure Virtual Desktop
    How to deploy Azure Virtual Desktop in Azure Portal Virtualization
  • AWS Budgets
    How to create AWS Budget AWS/Azure/OpenShift
  • FailedRegistration
    DNS Bad key 9017: The Cluster Name registration failed of one or more associated DNS names Virtualization
  • windows subsystem
    What is Windows Subsystem for Linux Windows Server
  • https   blogs images.forbes.com jasonevangelho files 2018 06 windows 7 2018 edition 1200x676 1
    Windows deployment cannot continue, the operating system is missing via MDT deployment Windows Server
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux

Delete Azure Tenant: Remove Custom Domain from Entra ID

Posted on 19/11/202419/11/2024 Christian By Christian No Comments on Delete Azure Tenant: Remove Custom Domain from Entra ID
Remove Custom Domain from Entra ID and Azure tenant

In this article, we shall discuss the steps to “Delete Azure Tenant: Remove Custom Domain from Entra ID”. To delete an Azure account and deregister a custom domain associated with Entra ID, the below steps must be followed carefully. Please see How to deactivate and reactivate a Slack user, “Microsoft Azure Active Directory: How to setup Azure AD Tenant“, and how to “Register Devices to Intune and EntraID Using Company Portal“.

Note that deleting your Azure account can be irreversible, so ensure all critical data is backed up. When an tenant) is deleted in Microsoft Entra ID, all resources in the organisation are also deleted. Prepare your organisation by minimising its associated resources before you delete.

Why Delete Azure Tenants?

There are numerous reasons why you would want to delete an Azure Tenant. One of the reasons could be that you have claimed an Office 365 license in a wrong tenant which was my case.

  • Another reason could be businesses consolidating multiple tenants or migrate to a different tenant for better resource and user management. A typical example of this is, merging two organisations or moving resources to a central tenant.
  • If a tenant was created for testing, development, or a temporary project, it may no longer be needed once the project concludes. While Azure Active Directory itself might not have direct costs, associated subscriptions, applications, and licenses can incur charges. Deleting unused tenants helps avoid unnecessary expenses.
  • When a tenant is no longer required, keeping it active might pose security or compliance risks especially if it is not actively monitored. Therefore, this was also a reason for the deletion in my environment.

Most importantly in my case, custom domains associated with a tenant cannot be used in another tenant unless removed. Therefore, since the tenant will NEVER be used anymore, it was sufficient to have it deleted.

Please see how to Move Azure Resources between Subscriptions, and “How to add and verify a custom domain name to Azure Active Directory“.

Remove Custom Domain from Entra ID (Azure Active Directory)

First, we will have to dissociate the custom domain from the Tenant. To do this, log in to the Azure Portal and navigate to Entra ID.

Ensure that no users, groups, or applications are using this domain; you may need to change them to the default onmicrosoft.com domain first by making this a primary domain.

In the left panel, select Custom domain names. Choose the custom domain you want to remove.

custom domain

Now, let us make the onmicrosoft.com the default domain. The tenant is associated with a custom domain, which needs to be disassociated and deleted.

remove domain

Note: You will also need to cancel (delete) all Entra ID subscriptions before deleting your Tenant. Also, the associated user to the custom domain, and the resource groups need to be removed

Delete User

To delete a user, this is straight forward. To do this, log in to the Azure Portal and navigate to Entra ID and navigate to Users.

Select the account(s) and have them deleted.

Delete Dependcies relating to domain

User account to delete

delete user

Confirm user deletion

Confirm user deletion

User account removed.

user deleted

Switch Domain

Now that we have deleted all dependancies associated with the custom domain. We will proceed to make the default directory the primary domain.

make default domain primary

Confirm to make the domain the primary domain.

domain made primary

As you can see below, we have successfully made the onmicrosoft.com the primary domain.

Domain-name-switched

Click on Delete to remove the custom domain.

Delete Domain

Click on delete again. As you can see, we have met the delete requirement as well.

Delete custom domain

Custom domain successfully deleted.

domain removed

Please see how to Fix missing path and delete a Veeam Backup Repository, How to Install OpenSSL on Windows Computers, and how to Fix the Port used for the Virtualhost is not an Apache Listen Port.

Delete subscription

If you have an active or canceled Azure subscription associated with your Microsoft Entra tenant, you can’t delete the tenant.

After you cancel, billing is stopped immediately. After you cancel a subscription, your billing stops immediately. You can delete your subscription directly using the Azure portal seven days after you cancel it, when the Delete subscription option becomes available.

Once your subscription is deleted. Microsoft waits 30 to 90 days before permanently deleting your data in case you need to access it or reactivate your subscription

As you can see, we have got no subscriptions associated. You can’t delete an organization in Microsoft Entra ID until it passes several checks. These checks reduce the risk that deleting a Microsoft Entra organization negatively affects user access, such as the ability to sign in to Microsoft 365 or access resources in Azure.

But you could have dependencies from O365. You also have to check this, else you will never be able to delete the Tenant.

Remove any subscription if available

Delete Azure Tenant

To delete the Tenant, click on “Manage Tenants” as shown below

Manage tenant

As shown below, only one tenant is present, and it will be deleted for consolidation purposes.

delete tenant

As you can see below, I have not meet the prerequisites to have this tenant deleted.

I will work through the affected status and ensure all required actions are met.
tenant deletion failure

For the enterprise application (BingWebmasterTools), I will proceed to the blade and have it deleted. Also, for LinkedIn, I will have this deleted.

A few enterprise applications can’t be deleted in the Microsoft Entra admin center and might block you from deleting the tenant. Please use the PowerShell code to remove those applications as discussed in this Microsoft Guide.

deete big webmaster

Now, we are having issues with a license based subscripting and this related to O365.

Delete O365 subscription

Unassign Office 365 License

Navigate to the Office 365 Admin Center, and unassign the license

unassign license

You will also have to cancel the subscription as I wish t use this with another tenant.

cancel subscription

I will also delete it. This might not be the case for you.

delete and confirm subscrition deletion for 0365

Shortly, you will get an email stating that “Christian Eromosele submitted a request on November 14, 2024 to delete your Office 365 E3 EEA (no Teams) subscription. It is currently disabled and will be deleted on November 17, 2024. After your subscription is deleted, it can’t be recovered. If you’d like to reactivate it, you may do so until November 16, 2024. To reactivate your subscription: In the Microsoft 365 admin center, go to Billing > Your products. On the Your products page, find the subscription that you want to reactivate. In the Billing section of that subscription, select Reactivate now. Confirm or change your payment method, and then select Reactivate.

Below is the email received just for your information.

Subscriptin deleted

Note: According to the Microsoft documentation. After you’ve deleted a subscription in your organisation and 72 hours have elapsed, sign in to the Microsoft Entra admin center again. Confirm that no required actions or subscriptions are blocking your organisation deletion. You should be able to successfully delete your Microsoft Entra organization.

After the said hors has passed, you can see all checks have passed and I can now delete the Azure Tenant. Click on delete to delete the Tenant.

Delete Tenant

Account has been successfully scheduled for deletion.

Tenant scheduled for deletion

The Tenant is gone!

That is all you need to do to clean up tenants that are no longer useful or when you are transitioning away from Azure.

unable to access azure portal - something went wrong

I hope you found this article on “Delete Azure Tenant: Remove Custom Domain from Entra ID” very useful. Please feel to leave a comment below.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Pocket (Opens in new window) Pocket
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
AWS/Azure/OpenShift Tags:Azure, Azure Active Directory, Azure AD, Azure AD Tenant, Domain

Post navigation

Previous Post: Fix missing path and delete a Veeam Backup Repository
Next Post: AADSTS50020: User from Identity Provider does not exist in Tenant

Related Posts

  • a Multiple SPF Records  Issues and Examples@2x
    How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
  • DevOps GIT Docker Kubernetes
    Azure DevOps: Docker and Kubernetes Deployment with GitHub AWS/Azure/OpenShift
  • amazon ec2 multiple ips 1
    What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
  • Webp.net resizeimage 5
    How to Improve Website Response Using Traffic Manager AWS/Azure/OpenShift
  • Set a Resource Delete Lock
    How to Add a Delete Lock on Azure Resources AWS/Azure/OpenShift
  • APIFEATURE
    Benefits of Azure API Management and how to create an API instance AWS/Azure/OpenShift

More Related Articles

a Multiple SPF Records  Issues and Examples@2x How to setup SPF and TXT Records in AWS AWS/Azure/OpenShift
DevOps GIT Docker Kubernetes Azure DevOps: Docker and Kubernetes Deployment with GitHub AWS/Azure/OpenShift
amazon ec2 multiple ips 1 What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
Webp.net resizeimage 5 How to Improve Website Response Using Traffic Manager AWS/Azure/OpenShift
Set a Resource Delete Lock How to Add a Delete Lock on Azure Resources AWS/Azure/OpenShift
APIFEATURE Benefits of Azure API Management and how to create an API instance AWS/Azure/OpenShift

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • Upgrade veeam Backup and replication
    How to upgrade Veeam Backup and Replication 12.3 Backup
  • windows server
    How to backup and restore a Windows DHCP Server via the DHCP Manager and PowerShell Windows Server
  • Azure Virtual Desktop
    How to deploy Azure Virtual Desktop in Azure Portal Virtualization
  • AWS Budgets
    How to create AWS Budget AWS/Azure/OpenShift
  • FailedRegistration
    DNS Bad key 9017: The Cluster Name registration failed of one or more associated DNS names Virtualization
  • windows subsystem
    What is Windows Subsystem for Linux Windows Server
  • https   blogs images.forbes.com jasonevangelho files 2018 06 windows 7 2018 edition 1200x676 1
    Windows deployment cannot continue, the operating system is missing via MDT deployment Windows Server
  • Ubuntu on Windows
    Install Ubuntu 20.04 LTS on Windows via WSL Linux

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,827 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.