Unable to join Azure AD domain from Azure VM

Bryan 6 Reputation points

Hello, I'm new to Azure and am trying to join a VM to my Azure hosted AD. This is a .onmicrosoft.com domain.

The message I'm getting is

The following error occurred when DNS was queried for the service location (SRV) resource record used to locate an Active Directory Domain Controller (AD DC) for domain "[domain name]":

The error was: "DNS name does not exist."
(error code 0x0000232B RCODE_NAME_ERROR)

I've verified that I'm able to ping the AD IP from the Windows VM.

I'm following the steps outlined in https://learn.microsoft.com/en-us/azure/active-directory-domain-services/join-windows-vm

Any help or tips would be appreciated.

Thank you in advance!

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,375 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Cristian SPIRIDON 4,471 Reputation points


    It does not make sense to have your domain with onmicrosoft.com suffix.

    I think you need to have your own DNS name and use it when you create the service.

    In the examples from the docs MSFT always uses custom domain name:


    Hope this helps!

    0 comments No comments

  2. Rachel Gomez 166 Reputation points

    Troubleshooting steps are given below -

    Ensure the VM is connected to the same, or a peered, virtual network as the managed domain. If not, the VM can't find and connect to the domain in order to join.
    If the VM isn't connected to the same virtual network, confirm that the virtual networking peering or VPN connection is Active or Connected to allow the traffic to flow correctly.
    Try to ping the domain using the domain name of the managed domain, such as ping aaddscontoso.
    If the ping response fails, try to ping the IP addresses for the domain displayed on the overview page in the portal for your managed domain, such as ping
    If you can successfully ping the IP address but not the domain, DNS may be incorrectly configured. Make sure that you've configured the managed domain DNS servers for the virtual network.
    Try flushing the DNS resolver cache on the virtual machine, such as ipconfig /flushdns.
    Try again to join Azure AD

    Rachel Gomez

    0 comments No comments