Azure / Azure/azure-cli

Using Az resource list to select web apps returns duplicates

Open
#25,214 4 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign Azure CLI Team feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug
Running az resource list will return duplicate results for web apps, and Azure SQL resources. Tried filtering results by name, and found that it returned results with the same ID.

**Command Name**
`az resource list`

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- use `azd init`
- deploy `csharp-todo-sql`
- then run
```
az resource list -g {} --query "[? tags.\`"azd-service-name\`" == 'web' ].name"
```

## Actual Behavior
Two web apps are returned
```
[
"app-web-i4ugtihr2mwwm",
"app-web-i4ugtihr2mwwm"
]
```

## Expected Behavior
Single web app is returned

## Environment Summary
```
Windows-10-10.0.22621-SP0
Python 3.10.8
Installer: MSI

azure-cli 2.44.1
```
## Additional Context

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.