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
  • How to upgrade Trellix ePolicy Orchestrator
    How to upgrade Trellix ePolicy Orchestrator Security | Vulnerability Scans and Assessment
  • windows update 03
    How to automate Windows Update with PowerShell Scripts
  • FEATURE IMAGE IMAGE
    Install and configure Prometheus for Monitoring on a Linux Linux
  • active directory faq 2016 1
    How to detect who disabled a user in Active Directory Windows Server
  • fde container
    Full Disk Encryption with PBA or without PBA, UEFI, Secure Boot, BIOS, File and Directory Encryption and Container Encryption Security | Vulnerability Scans and Assessment
  • image 9
    Fix Error 853: The remote access connection completed, but authentication failed because the certificate that authenticates the client to the server is not valid Network | Monitoring
  • Nosound chrome
    How to fix No sound on Google Chrome JIRA|Confluence|Apps
  • admin6 1
    How to run Apps as an administrator on Windows Windows

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.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to 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

  • amazon ec2 multiple ips 1
    What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
  • image 73
    How to manage and use Amazon S3 access points using the AWS Management Console AWS/Azure/OpenShift
  • Azure VM Creation With CLI 1
    Deploy a Linux virtual machine (VM) on Azure using the Azure CLI AWS/Azure/OpenShift
  • Microsoft LAPS
    Configure Windows LAPS Management with Microsoft Intune AWS/Azure/OpenShift
  • Docker Guide
    Pull and Deploy Nginx Container Images from Docker Hub AWS/Azure/OpenShift
  • azure ADConnect
    Repair or Uninstall Azure AD Connect: How to uninstall Azure AD Connect AWS/Azure/OpenShift

More Related Articles

amazon ec2 multiple ips 1 What to note before assigning Multiple IPs’ to an Instance AWS/Azure/OpenShift
image 73 How to manage and use Amazon S3 access points using the AWS Management Console AWS/Azure/OpenShift
Azure VM Creation With CLI 1 Deploy a Linux virtual machine (VM) on Azure using the Azure CLI AWS/Azure/OpenShift
Microsoft LAPS Configure Windows LAPS Management with Microsoft Intune AWS/Azure/OpenShift
Docker Guide Pull and Deploy Nginx Container Images from Docker Hub AWS/Azure/OpenShift
azure ADConnect Repair or Uninstall Azure AD Connect: How to uninstall Azure AD Connect 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
 
  • How to upgrade Trellix ePolicy Orchestrator
    How to upgrade Trellix ePolicy Orchestrator Security | Vulnerability Scans and Assessment
  • windows update 03
    How to automate Windows Update with PowerShell Scripts
  • FEATURE IMAGE IMAGE
    Install and configure Prometheus for Monitoring on a Linux Linux
  • active directory faq 2016 1
    How to detect who disabled a user in Active Directory Windows Server
  • fde container
    Full Disk Encryption with PBA or without PBA, UEFI, Secure Boot, BIOS, File and Directory Encryption and Container Encryption Security | Vulnerability Scans and Assessment
  • image 9
    Fix Error 853: The remote access connection completed, but authentication failed because the certificate that authenticates the client to the server is not valid Network | Monitoring
  • Nosound chrome
    How to fix No sound on Google Chrome JIRA|Confluence|Apps
  • admin6 1
    How to run Apps as an administrator on Windows Windows

Subscribe to Blog via Email

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

Join 1,841 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

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.