I have been trying to create an Active Directory for my environment. I chose Microsoft Azure. I have been able to create the users to the directory and also created a VM of Windows Server 2012.

I want that the systems in the environment can directly connect to the domain that I have provided in Microsoft Azure, but I get this error: "An Active Directory Domain Controller (AD DC) for the domain could not be contacted."

Attached here is the snap

  • Since there is confusion in the answers - you'll need to update your question to reflect whether you're using Azure AD Domain Services, or just deploying a Domain Controller on top of an Azure VM. – MDMarra Mar 20 '18 at 14:15

You need to enable "Domain Services" on your Azure AD instance.

"Azure Active Directory (AD) Domain Services"

  • This is not correct. If a domain controller is being deployed to Azure IaaS, that is completely independent of Azure AD Domain Services. – MDMarra Mar 20 '18 at 11:21
  • @MDMarra the OP did not say anything about creating Domain Controllers using IaaS services. The way it reads...he created an Azure AD instance and then he created a Windows 2012 VM and now he is trying to join the VM to the Azure AD domain he created. – phydeauxman Mar 20 '18 at 11:27
  • thank you phydeauxman this what my problem is the system here refers to a laptop or a desktop – john reese Mar 21 '18 at 11:48

This is most likely a DNS issue. You need to do the following:

  1. Ensure that you've followed the best practices for deploying Active Directory on Azure IaaS. This includes a data disk with a non-standard caching policy. Read the whole guide.

  2. Ensure that your domain controller has a static IP set in the Azure console not in the network adapter itself. The network interface is non-persistent and can change during self-healing events. You need to set the DC's static IP in the Azure console itself, or via Azure PowerShell.

  3. Update your vNet to use the DCs deployed in Azure as the only DNS servers.

  4. Reboot any servers that are currently deployed in Azure, so that the new DNS settings take effect.

  5. Try again.


It's a bit unclear what you mean by systems here: whether you are trying to join your VM to the Azure AD DS domain or some local machine (server or workstation). If the screenshot is from the VM, you are using the correct tool and could check for the Connectivity issues section from Troubleshoot joining a domain, since the error seems to be related to a connectivity issue.

If the virtual machine is unable to find the domain, try one or more of the following:

  • Ensure that the virtual machine is connected to the same virtual network as the one that you've enabled Azure AD DS in. If it is not connected, the virtual machine is unable to connect to the domain and therefore is unable to join the domain.

  • Ensure that the virtual machine is on a virtual network that is in turn connected to the virtual network in which you've enabled Azure AD DS.

  • Try to ping the domain by using the domain name of the managed domain (for example, ping contoso100.com). If you're unable to do so, try to ping the IP addresses for the domain that's displayed on the page where you enabled Azure AD DS (for example, ping If you're able to ping the IP address but not the domain, DNS might be incorrectly configured. Check to see whether the IP addresses of the domain are configured as DNS servers for the virtual network.

  • Try flushing the DNS resolver cache on the virtual machine (ipconfig /flushdns).

If this is a on-premises system, you don't use AAD DS for joining to the domain. You would either need to have some L2 connection to the cloud network or authenticate using AAD credentials instead of AAD DS (the Join Azure AD wizard on Windows 10).

  • system here refers to a laptop or a desktop -Esa Jokinen – john reese Mar 21 '18 at 11:50
  • Then, the last paragraph applies. – Esa Jokinen Mar 21 '18 at 11:50
  1. Do not change the dns settings on the VM's, leave them alone. When DNS is installed on the DC it will assign primary DNS as, no secondary, this is normal.
  2. Change the DNS settings on the virtual network for the client you are trying to join the domain in Azure.

  3. reboot the client, join it to the domain, reboot again, done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.