Azure / Azure/azure-cli-extensions

[resource-graph] Queries always return resourceGroup even when just requesting id

Open
#3,184 7 comments 0 reactions 0 assignees View on GitHub
feature-request Output
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Extension name (the extension in question)
azure-cli 2.21.0
resource-graph 1.1.0

### Description of issue (in as much detail as possible)
When doing a simple query like:
`az graph query -q "Resources | project id"`

it will always return id + resourceGroup

```
[
{
"id": "/subscriptions/....",
"resourceGroup": "Name_of_ReG"
}
]
```

I would expect it to return the columns I requested.

I can work around it by doing an additional query with az-cli
`az graph query -q 'Resources | project id' --query '[].{id:id}'`

Greetings
Klaas

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.