Not able to Provision Azure Virtual Desktop using Rest APIs

siddalinga 0 Reputation points
2024-11-07T12:47:57.3833333+00:00

Dear Microsoft Community,

I am trying to build a POC for AVD(Azure Virtual Desktop) Provisioning using REST APIs.

I learned, for Provisioning a AVD, we need to complete few steps.

  1. Create Security Group (for Users, Administrators)
  2. Create Resource Group
  3. Create Virtual Network
  4. Create Sub Network
  5. Create Network Interface
  6. Create HostPool
  7. Create Session Host (Virtual Machine) in the Hostpool
  8. Create Hostpool Application Group
  9. Create Hostpool Work Space
  10. Add Security Groups to HostPool Application Group
  11. Add Resource Group IAM Roles (user, admin) to Security Group

Using Microsoft Azure RestAPIs I am able to complete 1st to 6th step.

When I am running the 7th step (For Create Session Host (Virtual Machine) in the Hostpool) the API status is Success but Session Host (VM) is not creating in the HostPool

Did any one worked on this kind of POC ?

I have followed below links to find the right API for Session Host (VM) creation in the Hostpool but could not get success.

https://learn.microsoft.com/en-us/rest/api/desktopvirtualization/session-host-managements/create-or-update?view=rest-desktopvirtualization-2024-08-08-preview&tabs=HTTP

https://learn.microsoft.com/en-us/rest/api/desktopvirtualization/host-pools/create-or-update?view=rest-desktopvirtualization-2024-04-03&tabs=HTTP

https://learn.microsoft.com/en-us/rest/api/desktopvirtualization/session-host-configurations/create-or-update?view=rest-desktopvirtualization-2024-08-08-preview&tabs=HTTP

I appreciate your response.

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
705 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,173 questions
Azure Dedicated Host
Azure Dedicated Host
An Azure service that provides a dedicated physical server to host Azure virtual machines for Windows and Linux.
51 questions
Azure Virtual Desktop
Azure Virtual Desktop
A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
1,624 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Krishna Katakam 1,510 Reputation points Microsoft Vendor
    2024-11-07T15:40:46.85+00:00

    Hi siddalinga,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    It sounds like you’re encountering an issue with creating a Session Host (Virtual Machine) in the HostPool using Azure Virtual Desktop (AVD) REST APIs. To troubleshoot this issue, there are a few steps:

    Make sure that the API permissions are correctly set up. The service principal or managed identity you’re using must have the necessary permissions to create resources in the specified resource group and subscription.

    Double-check the API request payload for any missing or incorrect parameters. Ensure that all required fields are correctly populated.

    Verify that you have not exceeded any quotas or limits for your subscription, such as the number of virtual machines or cores.

    If an answer has been helpful, please consider accept the answer and "Upvote" to help increase visibility of this question for other members of the Microsoft Q&A community. 

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.