Azure / Azure/azure-powershell
Get-AzConsumptionUsageDetail returns 'BadRequest'
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
same issue as https://github.com/Azure/azure-powershell/issues/10203 , however that is closed so I'm opening a new issue
## Steps to reproduce
```PS C:\WINDOWS\system32> Get-AzConsumptionUsageDetail
Get-AzConsumptionUsageDetail : Operation returned an invalid status code 'BadRequest'
At line:1 char:1
+ Get-AzConsumptionUsageDetail
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzConsumptionUsageDetail], ErrorResponseException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Consumption.Cmdlets.UsageDetails.GetAzureRmConsumptionUsageDetail
```
## Environment data
```
PS C:\WINDOWS\system32> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.18362.752
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.752
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
Contributor guide
Research direction
Start with the Get-AzConsumptionUsageDetail command and compare its behavior with the related issue #10203. Reproduce the BadRequest using the documented PowerShell environment, then trace the command's Consumption request to identify the failing input or service interaction. Done means the command returns usage details without the invalid status error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100