Nasty Orphaned Azure Tenant lying around locking a custom domain

Richard Rees 0 Reputation points
2025-11-02T21:33:03.7833333+00:00

I signed up to a 365 account when I bought my domain through GoDaddy, and set up an Azure Static Website on it with a custom domain attached. Then I realised that I didnt have enough control over the 365/Entra with GoDaddy, so I deleted the 365 account (but forgot to remove the Azure tenant).

Now I have bought a 365 account direct with Microsoft, and set up the static website in Azure - however I can't attach the custom domain any more, I'm guessing because it still on the old tenant?

I don't have a support plan, so I'm not sure how I can go about getting that old tenant cleared out so I can use the custom domain again?

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jerald Felix 9,835 Reputation points
    2025-11-13T13:38:35.49+00:00

    Hello Richard Rees,

    Your situation with a leftover orphaned Azure tenant locking your custom domain after deleting the original Microsoft 365 account via GoDaddy is a common but tricky issue because Microsoft enforces domain ownership verification and tenancy locks for security reasons. Without a support plan, direct self-service removal of such orphaned tenants and releasing the domain is not possible through the portal due to protection against domain hijacking. However, you can follow these general steps to try to regain control or get it released:

    Step 1: Verify Domain Ownership

    • Ensure you have access to the domain’s DNS control panel (GoDaddy or your registrar).
    • Confirm you can edit DNS TXT records or add CNAME entries—this is essential to prove ownership.

    Step 2: Attempt Domain Removal in Entra ID (Azure AD)

    • Sign in to https://entra.microsoft.com with your new Microsoft 365 tenant admin.
    • Navigate to Tenant > Custom domain names.
    • Check if the domain from the orphaned tenant is listed; if it is, removal won’t succeed as it’s locked.
    • If your new tenant already has this domain added and verified, proceed.

    Step 3: Open a Support Ticket for Domain Release

    • Since no self-service is available to release domains from orphaned tenants, create a support request at https://portal.azure.com > Help + Support > New support request.
    • Under Issue Type, select Technical Support, then choose Microsoft 365 or Entra ID.
    • Provide:
      • Proof of domain ownership (screenshots showing registrar control or DNS TXT record).
      • Your new tenant ID and subscription.
      • Details of the old tenant (if known).
      • Explain you want the domain released from the orphaned tenant due to domain lock.
    • Microsoft verifies ownership, and if confirmed, their backend team manually removes domain registration from the orphaned tenant, allowing reuse.

    Step 4: Clean Up Old Tenant (If You Have Access)

    • If you can log in as any admin to the old tenant:
      • Remove all users/groups/app registrations referencing the custom domain.
      • Change primary domain to default *.onmicrosoft.com.
      • Remove/verify domain from Entra ID > Domains.

    Step 5: Use PowerShell for Orphaned Object Cleanup (Optional)

    • You may try scripts to remove stale users/groups referencing the domain in Azure AD via Remove-AzureADUser or Remove-MgUser with domain filtering, freeing domain dependencies.

    Additional Tips

    • Patience required: Support team manual release can take several days.
    • Keep your new tenant DNS correctly set up for new domain validation.
    • Don't add the domain to your new tenant until old tenant domain release confirmed to avoid verification failures.
    • Document all correspondence for follow-ups.

    Sadly, without support, or if you can’t prove ownership, no automated way exists to remove the domain from the orphaned tenant. Microsoft’s Docs and communities strongly recommend support escalation for domain release in these situations.

    If this helps you get started, please accept the answer.

    Best Regards,

    Jerald Felix

    0 comments No comments

  2. Shree Hima Bindu Maganti 6,120 Reputation points Microsoft External Staff Moderator
    2025-11-26T16:31:09.7066667+00:00

    Hello Richard Rees,
    It looks like you're having some trouble with your custom domain and Azure tenant. Since the old Microsoft 365 account was deleted but the Azure tenant wasn’t removed, your custom domain is likely still linked to that tenant.

    Make sure your custom domain is directed to your Static Web App. If it’s still connected to the old tenant, you won’t be able to add it to the new account.

    You’ll need access to the old tenant to remove the custom domain. If you have admin access, log in to the Azure portal, go to Azure Active Directory, and under Custom domain names, delete the domain. Check that nothing else is using the domain before deleting.

    If you can’t access the old tenant and need to use the custom domain, you might need to create a new Azure tenant. This would mean migrating your resources, which could be a lot of work.

    As a workaround, you can use a different domain you own until you resolve the issue with the original one.
    Custom domains in Azure Static Web Apps

    Problem deleting a domain name

    Manage your initial default .onmicrosoft.com domain name

    Mitigating subdomain takeovers in Azure App Service
    Let me know if you have any further assistances needed.

    0 comments No comments

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.