Skip to content

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

@Epokhe

Description

@Epokhe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Cost ManagementService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions