Invoke-AzRestMethod Deconstructed Parameters when using "GET" ignores payload #26755
Labels
customer-reported
needs-team-attention
This issue needs attention from Azure service team or SDK team
Description
Using
Invoke-AzRestMethod
with GET and payload completely ignores it. It should take the hashtable payload and append it as query parameters, in the same wayInvoke-Restmethod
does with-Body
.In the below script, the payload parameters are not appended as query parameters, they are just ignored. Therefore the query below there is no way to do without doing the -Uri method.
RequestURI generated for the below is
https://management.azure.com/subscriptions/52487fb1-7325-4ec9-9bb0-a9079e62d255/resourceGroups/PRTGDocker/providers/Microsoft.Compute/virtualMachines?api-version=2024-03-01
which is missing the expand query parameter.Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: