Azure / Azure/azure-cli

`az resource list` - feature: exclude hidden resources from portal

Open
#25,569 3 comments 1 reaction 2 assignees Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Auto-Assign customer-reported feature-request RBAC Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**

`az resource list`

**Is your feature request related to a problem? Please describe.**

It's a problem in that this would be ok to ignore but since most of these hidden resources have spaces in the scopes, the scripts runs into issues. See https://github.com/Azure/azure-cli/issues/12885

**Describe the solution you'd like**

Since hidden resources are not shown by default in the portal, they should not be listed by default with the az command.

**Describe alternatives you've considered**

Tried using resource scopes with spaces in names.
`role_assignments=$(az role assignment list --scope \"$resource\" --query '[].principalName' -o tsv)`
would get error: `The request did not have a subscription or a valid tenant level resource provider.`

**Additional context**

Not sure if this is a Microsoft issue as I don't see any sort of flag or tag in the portal for the hidden resources that can be used with az cli.

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.