How to create session hosts using Rest API in AVD (Azure Virtual Desktop)?

Himanshu Nankani 71 Reputation points

The Desktop Virtualisation Rest API does not create session hosts. Also Session Host related API is missing the create API. Why is that? And how does one create SH from API without going to portal?


Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,439 questions
0 comments No comments
{count} votes

Accepted answer
  1. vipullag-MSFT 25,861 Reputation points

    @Himanshu Nankani

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Yes, you are correct, there is currently no AVD REST API for creating session hosts. You can create AVD session hosts either using the portal, the GitHub ARM templates, or by using some external script/automation to create Compute VMs and join them to host pools.

    Session Hosts creations are VM's that have a DSC extension that sets up the agents. For that extension to be able to add hosts to the hostpool you need to be able to pass a valid hostpool token to the extension. Session Hosts is just hostpool metadata information linking to real virtual machines. The agent does the job of 'linking' the VM to the hostpool.

    You can also check this AVD dedicated forum here for AVD related discussions here.

    Please feel free to drop a feedback on this feature request of getting direct API here, Product team will check and prioritize this.

    Hope that helps.
    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

0 additional answers

Sort by: Most helpful