Office 365 domain ForceTakeOver

1 minute read

If you are an Office 365 administrator, I believe that you have experienced this scenario. The situation when you want to add a domain to an Office 365 tenant, but you cannot because it is blocked by a different tenant .

More specifically, a customer wants you to set up a domain in their current tenant and when you try to add the domain it keeps telling you that the domain is being used already.

But when you ask the customer they do not know, they had used the domain previously in a different tenant. Then usually it goes down that the customer gets angry or impatient but you cannot solve it easily because you do not have an access to the historical tenant to remove the domain.

If you know the feeling, this blog will save you a lot of time and grey hair.
The solution is actually very easy and you do not even need the access to the historical tenant.

All you need is:

  • Basic PowerShell knowledge
  • Access to the domain provider
  • Administrator access to the current tenant.

Here are the steps, you need to do:

  1. To connect to Azure AD via PowerShell , install the Sign in assistant:
  2. Run PowerShell as an adminstrator

And now the commands:

Set-ExecutionPolicy unrestricted
Install-Module MSOnline (install module)
Sign in as an Administrator of the current tenant (where the domain should be verified to)
New-MsolDomain –name (adding domain)
Get-MsolDomain (check the status - should be Unverified)
Get-MsolDomainVerificationDns –DomainName –Mode DnsTxtRecord (to get the TXT record, which should be set at domain provider)
Add the generated TXT record to the domain provider (it should look like MS=xxxxxx)
As soon as you are sure, that the record is visible at MX Toolbox or, you can move forward to the next step
Confirm-MsolDomain –DomainName –ForceTakeover Force

Let us know in comments if it helped you or if you have any questions!

Leave a Comment

Your email address will not be published. Required fields are marked *