To setup TFS in Azure, AD can be setup as Azure VM. It is possible to use corporate AD with Azure, and use it to setup TFS in Azure VM. To setup AD in Azure VM it is required to setup a virtual network in Azure.
The steps to setup a VM to create an AD as an Azure VM are described below.
Setting up VM
Select a Windows Server 2012 R2 Datacenter image for a VM.
Specify name for VM and User Name and Password. Standard A1 machine would be sufficient.
Provide a cloud service dns name.
Select the Virtual Network created previously.
Provide availability set name.
Select to Install VM Agent.
VM is created.
Following links provide detailed information on Azure Availability Set.
Since this is a demo environment there is no need to setup high availability. Remove the availability set from VM configuration can be done like shown below.
Select Remove from availability set and save. VM will be restarted.
Log in to VM
Click on Connect to download the rdp file to access VM.
Open rdp file and provide user name and password specified to create the VM to login.