[Feature Request] az role assignment list/delete
: Make --scope
a required argument
#30471
Labels
Auto-Assign
Auto assign by bot
Azure CLI Team
The command of the issue is owned by Azure CLI team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
RBAC
az role
Milestone
#27651 made
--scope
a required argument foraz role assignment create
.I propose making
--scope
a required argument foraz role assignment list/delete
too, as explained below:az role assignment list
Even though the output of this command contains no secret, it contains PII - the email address of the assignee:
Without specifying
--scope
, this command lists all role assignments under the current subscription. The PII can be saved into build logs, such as GitHub Action logs. Therefore, we should ask the user to explicitly specify the scope under which role assignments should be listed to avoid showing PII as much as possible.az role assignment delete
#13577 made a very nice metaphor: This command is an insane footgun. Without specifying
--scope
, it deletes all role assignment under the current subscription. We should ask the user to explicitly specify the scope under which role assignments should be deleted to avoid expectedly nuking the whole subscription.Making
--scope
a required argument aligns allcreate
,list
anddelete
commands to have a consistent interface.The text was updated successfully, but these errors were encountered: