This API is being deprecated. Instead of using it, have you attempted using the Generate Cost Details Report API instead? So instead of the above request, you would do
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateCostDetailsReport?api-version=2023-08-01
{
"metric": "ActualCost",
"billingPeriod": "202307"
}
Where billingAccountId
is the billing id from Cost+Management properties page.