|
23 | 23 | # pylint: disable=too-many-statements |
24 | 24 | def load_arguments(self, _): |
25 | 25 | with self.argument_context('ad') as c: |
26 | | - c.ignore('_subscription') # hide global subscription param |
27 | 26 | c.argument('owner_object_id', help="owner's object id") |
28 | 27 | c.argument('show_mine', action='store_true', help='list entities owned by the current user') |
29 | 28 | c.argument('include_all', options_list='--all', action='store_true', |
30 | 29 | help='list all entities, expect long delay if under a big organization') |
31 | 30 |
|
32 | 31 | with self.argument_context('ad app') as c: |
| 32 | + c.ignore('_subscription') |
33 | 33 | # https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0 |
34 | 34 | c.argument('app_id', help='application id') |
35 | 35 | c.argument('application_object_id', options_list=('--object-id',)) |
@@ -176,6 +176,7 @@ def load_arguments(self, _): |
176 | 176 | c.argument('identifier', options_list=['--id'], help='identifier uri, application id, or object id of the associated application') |
177 | 177 |
|
178 | 178 | with self.argument_context('ad sp') as c: |
| 179 | + c.ignore('_subscription') |
179 | 180 | c.argument('identifier', options_list=['--id'], help='service principal name, or object id') |
180 | 181 |
|
181 | 182 | with self.argument_context('ad sp create') as c: |
@@ -253,6 +254,7 @@ def load_arguments(self, _): |
253 | 254 | c.argument('query_filter', options_list=['--filter'], help='OData filter, e.g. --filter "displayname eq \'test\' and servicePrincipalType eq \'Application\'"') |
254 | 255 |
|
255 | 256 | with self.argument_context('ad user') as c: |
| 257 | + c.ignore('_subscription') |
256 | 258 | c.argument('mail_nickname', help='mail alias. Defaults to user principal name') |
257 | 259 | 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') |
258 | 260 | c.argument('account_enabled', arg_type=get_three_state_flag(), help='enable the user account') |
@@ -280,6 +282,7 @@ def load_arguments(self, _): |
280 | 282 |
|
281 | 283 | group_help_msg = "group's object id or display name(prefix also works if there is a unique match)" |
282 | 284 | with self.argument_context('ad group') as c: |
| 285 | + c.ignore('_subscription') |
283 | 286 | for arg in VARIANT_GROUP_ID_ARGS: |
284 | 287 | c.argument(arg, options_list=['--group', '-g'], validator=validate_group, help=group_help_msg) |
285 | 288 |
|
@@ -311,6 +314,7 @@ def load_arguments(self, _): |
311 | 314 | c.argument('member_object_id', options_list='--member-id', help=member_id_help_msg) |
312 | 315 |
|
313 | 316 | with self.argument_context('ad signed-in-user') as c: |
| 317 | + c.ignore('_subscription') |
314 | 318 | c.argument('object_type', options_list=['--type', '-t'], help='object type filter, e.g. "application", "servicePrincipal" "group", etc') |
315 | 319 |
|
316 | 320 | with self.argument_context('role') as c: |
|
0 commit comments