Forum Discussion

Gabriel_Naranjo's avatar
Gabriel_Naranjo
Brass Contributor
Feb 16, 2025

How to update to DesktopVirtualization API v. 2024-04-08-preview or API v. 2024-04-03?

Hello everyone,

The information from my side is also not clear. I understand that if ARM templates, Terraform, Bicep, or something similar are not used, it is not necessary, and Microsoft performs that operation transparently. The message is universal, meaning that all customers who have deployed AVD receive it, but they do not know who uses and specifies the API version. For example, when creating an AVD through the Azure portal, you do not specify the API version at any time. If we go to the Resource Provider and look for Microsoft.DesktopVirtualization, we see that the default API cannot be changed and is in version "2privatepreview." Interestingly and crazily enough, even with this default API, if you deploy an AVD, the system chooses an older version. So, if anyone has a clear response from Microsoft or has resolved this, it would be great if they could share it.

Regards.

At least until Microsoft indicates otherwise, I have conducted several tests in different environments and the result is the same and as follows:

I deploy the Hostpool and here we see the Json file of the hostpool, as you can see the API version is 2019-12-10-preview.

Now I am going to look inside the parameters used in the deployment and WOW, there we can see that the API used to deploy AVD is the latest one, 24-04-08-preview, which is the one Microsoft indicates to use. The 2019-04-01 is the schema version (another different one).

To finish confirming this, we go to Resource Provider and as we see, if we go inside the resource type and select hostpool, we see that the default version that CANNOT be changed is 2022-01-12-preview. But among the eligible versions is the one that has been used for our hostpool deployment, that is, 2024-04-08-preview.

 

  • See whether this can help:

     

    1. Check Current API Version: Review your ARM templates, Bicep files, or PowerShell scripts to see if they reference an older API version. For example, in ARM/Bicep, it might look like this:

    resource hostPool 'Microsoft.DesktopVirtualization/hostPools@2022-02-10' = {
        // Resource properties
    }
    

    If you find an older version, update it to 2024-04-03 or 2024-04-08-preview

     

    2. Update Azure CLI: Ensure you have the latest version of Azure CLI installed. You can update it using the following command:

    az upgrade
    

     

    3. Login to Azure: Use az login to authenticate.

     

    4. Modify Scripts: Update the API version in your scripts:

    az rest --method get --url "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/{resourceType}?api-version=2024-04-03"
    

     

    5. Test in Development Environment: Before deploying the updated API version to production, test it in a development or staging environment to ensure compatibility and functionality.

     

    6. Check Resource Provider: Navigate to the Resource Provider in the Azure portal and check the API version used for your host pools. Ensure it matches the latest version

    • Gabriel_Naranjo's avatar
      Gabriel_Naranjo
      Brass Contributor

      Hello Kidd_ip and thanks for response

      Exactly, my point here is to clarify that unless you use templates, deploy using bicep, terraform, this update will be necessary. In the case that AVD is deployed directly through the Azure portal, it will not be necessary since Microsoft manages it. My question is perhaps because it is a generic email it can create confusion. Correct?

      • Fals_Tech's avatar
        Fals_Tech
        Copper Contributor

        This is my general opinion as well. However, this doesn’t apply to those deploying over the Portal, as we can’t specify the API to use. Azure didn’t provide that information when they sent it. 

Resources