Azure / Azure/azure-cli-extensions

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

Open
#9,072 2 comments 1 reaction 0 assignees View on GitHub
bug Cost Management customer-reported Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### 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/"
az costmanagement export show --scope "subscriptions/" --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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.