-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Role] az role assignment list
: Include role assignments inherited from management groups
#30841
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
Hi @jiasli, |
️✔️AzureCLI-BreakingChangeTest
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
az role assignment list
: Include role assignments inherited from management groupsaz role assignment list
: Include role assignments inherited from management groups
@@ -578,7 +578,7 @@ def _search_role_assignments(cli_ctx, assignments_client, definitions_client, | |||
# "atScope()" and "principalId eq '{value}'" query cannot be used together (API limitation). | |||
# always use "scope" if provided, so we can get assignments beyond subscription e.g. management groups | |||
if scope: | |||
f = 'atScope()' | |||
f = 'atScope()' # atScope() excludes role assignments at subscopes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More discussion on this enforced atScope()
: #14302
Related command
az role assignment list
Description
Fix #25078
Currently
--include-inherited
only works for "normal" Azure resource ID, up to tenant level, such asThis reason is explained in #25078 (comment).
This PR includes role assignments inherited from management groups:
Testing Guide
The result will now include role assignments like: