Unable to verify custom domain name

Simon Green Kristensen 0 Reputation points
2026-04-27T09:30:30.1466667+00:00

I'm trying to add my company domain to our newly setup MS Azure and Entra org, so we can have verified screens on OAuth and login with our company emails (hosted elsewhere).

I have added the TXT record mentioned to our DNS, but it will not verify.

Screenshot of what I need to configure:

User's image

Screenshot of our DNS config, as can be seen in the Dig web interface (specifying "All" also yields results where each has the MS=ms... record):

User's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Oldest
  1. AI answer

    2026-04-27T09:31:00.4033333+00:00

    Domain verification in Microsoft Entra depends on three things only: the TXT/MX record must be in the authoritative DNS zone, must exactly match the value provided (including the MS= prefix), and DNS changes must have propagated.

    Use these steps to resolve the issue:

    1. Confirm the authoritative DNS and record placement
      • Identify where the domain’s authoritative DNS is hosted (for example, Cloudflare, Microsoft 365, registrar DNS, etc.). Verification only looks at the authoritative zone; any records at non‑authoritative providers are ignored.
      • Ensure the TXT record is created in that authoritative zone for the root of the domain (host/alias @ or blank, depending on the provider), not on a subdomain.
      • For external tenants and custom URL domains, the TXT record must be associated with the hostname of the domain being verified. If the hostname is empty or @, Microsoft Entra ID can’t verify a subdomain custom domain; in that case the TXT must be on the subdomain label (for example, login or account).
    2. Verify the TXT record value
      • In the DNS provider, the TXT record must be exactly what Entra shows, including the MS= prefix, for example:
        • Name/Host: @ (or the specific subdomain label if verifying login.example.com etc.)
        • Type: TXT
        • Value/Data: MS=msXXXXXXXX
        • TTL: 3600 seconds (or provider default close to that).
      • Common issues include:
        • Omitting the MS= part of the value.
        • Adding extra quotes or spaces around the value.
        • Placing the TXT on the wrong name (for example, on ocean.io. vs @ or vice versa, depending on how the provider interprets the host field).
    3. Check DNS propagation from outside
      • Use a DNS lookup tool or nslookup from a terminal to query the TXT records for the domain:
        • nslookup -q=TXT ocean.io
      • Ensure the response includes the exact MS=ms… value provided by Entra. If it does not appear, Entra cannot verify the domain.
    4. Wait for propagation and retry verification
      • DNS propagation can take from minutes up to several hours depending on TTL and provider.
      • Guidance for Entra and Microsoft 365 is to wait at least an hour, sometimes a few hours, before retrying verification.
      • After confirming the TXT record is visible via external lookup, return to Microsoft Entra admin center → Entra ID → Domain names → [your domain] and select Verify again.
    5. Check for conflicts or prior use
      • If the TXT record is correct and visible but verification still fails, check for these conditions:
        • The domain is already verified in another Microsoft Entra directory or Microsoft 365 tenant. A domain can be verified in only one directory at a time; if it’s in another tenant, it must be removed there first.
        • There is an unmanaged tenant (for example, created by self‑service sign‑up such as Power BI). In that case, take over the unmanaged directory before verifying the domain in the new tenant.

    Following these steps aligns with Microsoft’s documented troubleshooting for custom domain verification in Entra and Microsoft 365.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.