-
Notifications
You must be signed in to change notification settings - Fork 3.4k
az role definition list cannot show only built-in roles #30647
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamRBACaz roleaz roleact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamRBACaz roleaz roleact-identity-squadquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Related command
az role definition listIs your feature request related to a problem? Please describe.
According to https://learn.microsoft.com/en-us/azure/role-based-access-control/role-definitions-list#list-role-definitions, the underlying Role Definitions - List REST API supports returning
CustomRole+BuiltInRoleCustomRoleBuiltInRoleBut in CLI,
--custom-role-onlyonly supports returningCustomRole+BuiltInRoleCustomRoleazure-cli/src/azure-cli/azure/cli/command_modules/role/custom.py
Lines 166 to 167 in 649886e
thus losing the ability to only show
BuiltInRole.Describe the solution you'd like
az role definition listshould support a--typeargument that maps to the$filter=type+eq+'{type}'filter.Describe alternatives you've considered
Additional context