azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

az costmanagement export list returns empty; extension uses outdated 2020-06-01 API

Open Epokhe opened this issue 4 months ago • 2 comments

Describe the bug

az costmanagement export list returns an empty array at a subscription scope where a Cost Management export does exist. The same scope returns the export correctly via az rest when using the newer Exports API (e.g., 2025-03-01). With --debug, the extension shows it calls api-version=2020-06-01.

If I force the older API with az rest ... api-version=2020-06-01, it also returns empty. Looks like this old API version is not returning exports anymore. I think az costmanagement show is broken too.

Related command

az costmanagement export list --scope "/subscriptions/<SUBSCRIPTION_ID>"
az costmanagement export show --scope "subscriptions/<SUBSCRIPTION_ID>" --name <EXPORT_NAME>

Errors

Command returns empty array unexpectedly.

Issue script & Debug output

Not relevant

Expected behavior

az costmanagement export list should enumerate the same exports visible in the portal and via REST when using the current Exports API (e.g., 2025-03-01).

Environment Summary

azure-cli 2.76.0

core 2.76.0 telemetry 1.1.0

Extensions: account 0.2.5 costmanagement 1.0.0

Dependencies: msal 1.33.0b1 azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.76.0/libexec/bin/python' Config directory '/Users/baris/.azure' Extensions directory '/Users/baris/.azure/cliextensions'

Python (Darwin) 3.12.11 (main, Jun 3 2025, 15:41:47) [Clang 17.0.0 (clang-1700.0.13.3)]

Additional context

No response

Epokhe avatar Aug 20 '25 19:08 Epokhe

Thank you for opening this issue, we will look into it.

yonzhan avatar Aug 20 '25 19:08 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ms-premp, @ramaganesan-rg.