When using az role assignment list with both --scope and --include-classic-administrators, classic administrators are shown for the current subscription, not taking the subscription specified in the scope into account.
To Reproduce:
Create two Azure subscriptions
az account set --subscription <first-subscription-id>
az role assignment list --scope "/subscriptions/<second-subscription-id>" --include-classic-administrators
Output will look something like this (some properties were truncated):
Describe the bug
When using
az role assignment list
with both--scope
and--include-classic-administrators
, classic administrators are shown for the current subscription, not taking the subscription specified in the scope into account.To Reproduce:
az account set --subscription <first-subscription-id>
az role assignment list --scope "/subscriptions/<second-subscription-id>" --include-classic-administrators
Output will look something like this (some properties were truncated):
Expected Behavior
Roles and custom administrators from the second subscription are shown.
Environment Summary