Azure / Azure/azure-cli

`az role assignment list` gives conflicting instructions about `--all` and `--scope`

Open
#16,876 3 comments 1 reaction 1 assignee Claimed by @jiasli View on GitHub
act-identity-squad feature-request RBAC
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

**Command Name**
`az role assignment list`

**Errors:**
```
ValidationError: Parameter 'scope' can not be None.
```

## To Reproduce:

```
$ az role assignment list --role 'Network Contributor' --all
ValidationError: Parameter 'scope' can not be None.
$ az role assignment list --role 'Network Contributor' --all --scope /subscriptions/$SUBSCRIPTION
group or scope are not required when --all is used
```

## Expected Behavior

From the help text (`Show all assignments under the current subscription.`), I would expect `--all` not to produce an error, but instead to produce the same results as the following command:

```
$ az role assignment list --role 'Network Contributor' --scope /subscriptions/$SUBSCRIPTION
... (produces expected results)
```

## Environment Summary
```
Linux-5.4.0-58-generic-x86_64-with-debian-buster-sid
Python 3.6.10
Installer: DEB

azure-cli 2.18.0 *

```

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.