An error occurs in Az.AlertsManagement's Get-AzAlert due to an unnecessary PageCount=0 being specified. #27633
Labels
bug
This issue requires a change to an existing behavior in the product in order to be resolved.
customer-reported
Description
When execute the following command, a request is made to a URL containing the property PageCount=0, which results in an error.
commands:
Get-AzAlert -TimeRange '1h' -Debug
request url:
https://management.azure.com/subscriptions/bd32dc07-5ce8-4b81-aa16-2c0079b1b708/providers/Microsoft.AlertsManagement/alerts?includeContext=true&includeEgressConfig=false&pageCount=0&timeRange=1h&pages=1&api-version=2019-05-05-preview
error:
{
"code": "BadRequest",
"message": "Page count filter has to be between 1 and 250 Activity ID: 3542fa24-b831-4dba-b27e-1194602b8f25."
}
If the PageCount property is not being used in PowerShell, it needs to be modified so that the PageCount property is not included in the URL.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: