Skip to content

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

Description

@mvzink

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 *

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions