WVD – The template deployment not valid

WVD – The template deployment not valid

This article will describe what to do when you get the error in WVD template deployment not valid.


  • All the prerequisites for Windows Virtual Desktop are met, you can find them here: https://docs.microsoft.com/en-us/azure/virtual-desktop/overview. (I have a full, easy how-to-deploy Windows Virtual Desktop guide coming up in the next weeks)
  • You have Windows Virtual Desktop up and running and want to deploy a new host pool through the Azure Marketplace and even though it mostly works, sometimes it fails with this error:


  • Deploying a host pool without the Azure Marketplace


Windows Virtual Desktop is a comprehensive desktop and app virtualisation service running in the cloud. It’s the only virtual desktop infrastructure (VDI) that delivers simplified management, multi-session Windows 10, optimisations for Office 365 ProPlus and support for Remote Desktop Services (RDS) environments. Deploy and scale your Windows desktops and apps on Azure in minutes, and get built-in security and compliance features.

You can find more info on WVD here: https://azure.microsoft.com/en-gb/services/virtual-desktop/


1. Provisioning a host pool through the market place (to show the error)

In the Azure Portal, click on ‘Create a resource’ and look for ‘host pool’. Click on it. Click on ‘Create’. Choose a Subscription and a Resource Group (or create a new one), choose a hostpool name and fill in the default desktop users. Click on ‘Next’. Choose a usage profile and choose a virtual machine name prefix. Click on ‘Next’. Choose the image OS version (obviously you want the Windows 10 Enterprise multi-session with O365 ProPlus) and the disk type. Fill in the AD domain join UPN (beware, you can’t have ‘admin’ in the naming convention or it will fail!), provide the password twice, specify a domain or OU if needed. And at last choose a virtual network and the correct subnet (the VM should be able to join the domain controller!). Click on ‘Next’. Fill in your Windows Virtual Desktop tenant name. Obviously you choose ‘Service principal’ (otherwise you don’t have MFA enabled, and that should be really stupid no?) and fill the application ID, password and Azure AD tenant ID. Click on ‘Next: review + create’. And even though this should be working, we provided all the correct details. I’ve noticed that there’s a big percentage of time that the provisioning of a host pool through the Azure Marketplace just isn’t working. Windows Virtual Desktop is Generally Available, but you can see there is still a lot of testing/issues in production. I hope this will stabilise soon. As you can see we get the error here: ‘The template deployment is not valid’.     

2. Workaround to still deploy a host pool and continue your testing

Now we can workaround our error ‘Template deployment not valid’ with navigating to https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool and click on ‘Deploy to Azure’. This will start an ARM template. But if we just fill in all the fields, it will still fail, you have to make some minor adjustments on the template. First choose your subscription again, together with your resource group. As you can see in the screenshot below, my browser already filled in a password in the ‘_artifacts Location Sas Token’. You should clear this or you will get errors. The other thing to take notice of is that you should clear the ‘Rdsh Name Prefix’ and fill in the desired VM naming convention. Otherwise it will fail. So this is the correct way: Next choose the number of instances, your vm size if you want, fill in the domain to join, the domain UPN to join the VM to your domain, the password of that UPN, the existing Vnet name and it’s correct subnet and at then fill in the resource group of the virtual network. Fill in your existing WVD tenant name, choose a host pool name and choose the default user(s). In the ‘Tenant Admin UPN or Application ID’ field, you obviously fill in the application ID of your service principal (again if you choose UPN, you don’t have MFA enabled, not the way to go!), fill in the ‘Tenant Admin Password’, this is the service principal application password. Put the field ‘Is Service Principal’ on true and at last fill in your Azure AD tenant ID. Click ‘Agree’ and ‘Purchase’. After the validation, click on ‘Deployment in progress’ to follow up your ARM template deployment. You will see your deployment will work and you can continue your testing with Windows Virtual Desktop. And you’ll see in the ‘Virtual Machines’ blade that your VM is up and running:

So this is what we do when we get the error WVD template deployment not valid!


Happy testing! 


More articles: