Open adhodgson1 opened 3 weeks ago
@ryanosh Please help take a look, thanks.
This behavior is by design based on how the RDP properties are stored. The order is determined by the order the property is inserted into the hostpool, not on the order of the input string. If you want to re-order the properties, you will have to remove them in one PATCH then re-add them in a separate PATCH in the desired order.
API Spec link
https://github.com/Azure/azure-rest-api-specs/blob/main/specification/desktopvirtualization/resource-manager/Microsoft.DesktopVirtualization/stable/2024-04-03/desktopvirtualization.json
API Spec version
2024-04-03
Describe the bug
Reordering the customRDPProperty field after successfully creating a host pool doesn't take affect if the same properties are defined. I originally observed this behaviour when dealing with Terraform, this is opened in https://github.com/hashicorp/terraform-provider-azurerm/issues/27071
Expected behavior
Order of the items is changed
Actual behavior
Property is not updated
Reproduction Steps
Step1: Create a host pool with value of customRdpProperty starting with audiocapturemode:i:1;audiomode:i:0;. PUT /subscriptions/...resourceGroups/testRG/providers/Microsoft.DesktopVirtualization/hostPools/testpool?api-version=2022-02-10-preview HTTP/1.1 Request Body:
Step2: Reorder the value of customRdpProperty property, update the host pool with value of customRdpProperty starting with audiomode:i:0;audiocapturemode:i:1;. PATCH /subscriptions/.../resourceGroups/testRGproviders/Microsoft.DesktopVirtualization/hostPools/testpool?api-version=2022-02-10-preview HTTP/1.1 Request Body:
API response: { ... "properties":{ ... "customRdpProperty":"audiocapturemode:i:1;audiomode:i:0;camerastoredirect:s:;redirectclipboard:i:1;redirectcomports:i:0;usbdevicestoredirect:s:;devicestoredirect:s:;drivestoredirect:s:;redirectprinters:i:0;redirectsmartcards:i:0;encode redirected video capture:i:1;redirected video capture encoding quality:i:1;enablecredsspsupport:i:1;videoplaybackmode:i:1;redirectwebauthn:i:0;use multimon:i:1;", ... } }
Environment
No response