Skip to content

Commit 2195981

Browse files
committed
ignore-subscription
1 parent 1952665 commit 2195981

File tree

1 file changed

+5
-1
lines changed
  • src/azure-cli/azure/cli/command_modules/role

1 file changed

+5
-1
lines changed

src/azure-cli/azure/cli/command_modules/role/_params.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323
# pylint: disable=too-many-statements
2424
def load_arguments(self, _):
2525
with self.argument_context('ad') as c:
26-
c.ignore('_subscription') # hide global subscription param
2726
c.argument('owner_object_id', help="owner's object id")
2827
c.argument('show_mine', action='store_true', help='list entities owned by the current user')
2928
c.argument('include_all', options_list='--all', action='store_true',
3029
help='list all entities, expect long delay if under a big organization')
3130

3231
with self.argument_context('ad app') as c:
32+
c.ignore('_subscription')
3333
# https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0
3434
c.argument('app_id', help='application id')
3535
c.argument('application_object_id', options_list=('--object-id',))
@@ -176,6 +176,7 @@ def load_arguments(self, _):
176176
c.argument('identifier', options_list=['--id'], help='identifier uri, application id, or object id of the associated application')
177177

178178
with self.argument_context('ad sp') as c:
179+
c.ignore('_subscription')
179180
c.argument('identifier', options_list=['--id'], help='service principal name, or object id')
180181

181182
with self.argument_context('ad sp create') as c:
@@ -253,6 +254,7 @@ def load_arguments(self, _):
253254
c.argument('query_filter', options_list=['--filter'], help='OData filter, e.g. --filter "displayname eq \'test\' and servicePrincipalType eq \'Application\'"')
254255

255256
with self.argument_context('ad user') as c:
257+
c.ignore('_subscription')
256258
c.argument('mail_nickname', help='mail alias. Defaults to user principal name')
257259
c.argument('force_change_password_next_login', arg_type=get_three_state_flag(), help='Require the user to change their password the next time they log in. Only valid when --password is specified')
258260
c.argument('account_enabled', arg_type=get_three_state_flag(), help='enable the user account')
@@ -280,6 +282,7 @@ def load_arguments(self, _):
280282

281283
group_help_msg = "group's object id or display name(prefix also works if there is a unique match)"
282284
with self.argument_context('ad group') as c:
285+
c.ignore('_subscription')
283286
for arg in VARIANT_GROUP_ID_ARGS:
284287
c.argument(arg, options_list=['--group', '-g'], validator=validate_group, help=group_help_msg)
285288

@@ -311,6 +314,7 @@ def load_arguments(self, _):
311314
c.argument('member_object_id', options_list='--member-id', help=member_id_help_msg)
312315

313316
with self.argument_context('ad signed-in-user') as c:
317+
c.ignore('_subscription')
314318
c.argument('object_type', options_list=['--type', '-t'], help='object type filter, e.g. "application", "servicePrincipal" "group", etc')
315319

316320
with self.argument_context('role') as c:

0 commit comments

Comments
 (0)