Skip to content

Commit e5e6546

Browse files
authored
{AMS} Remove unnecessary resource argument (#30798)
1 parent 82c78ee commit e5e6546

File tree

1 file changed

+3
-6
lines changed
  • src/azure-cli/azure/cli/command_modules/ams/operations

1 file changed

+3
-6
lines changed

src/azure-cli/azure/cli/command_modules/ams/operations/sp.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ def reset_sp_credentials_for_mediaservice(cmd, client, account_name, resource_gr
4242
sp_oid = aad_sp['id'] # pylint: disable=unsubscriptable-object
4343

4444
profile = Profile(cli_ctx=cmd.cli_ctx)
45-
_, _, tenant_id = profile.get_login_credentials(
46-
resource=cmd.cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
45+
_, _, tenant_id = profile.get_login_credentials()
4746

4847
subscription_id = get_subscription_id(cmd.cli_ctx)
4948

@@ -84,8 +83,7 @@ def create_or_update_assign_sp_to_mediaservice(cmd, client, account_name, resour
8483
app_object_id = aad_application['id']
8584

8685
profile = Profile(cli_ctx=cmd.cli_ctx)
87-
_, _, tenant_id = profile.get_login_credentials(
88-
resource=cmd.cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
86+
_, _, tenant_id = profile.get_login_credentials()
8987
created_password = add_sp_password(graph_client, entity_name_string='password', app_id=app_object_id,
9088
password_display_name=password_display_name, years=years)
9189

@@ -104,8 +102,7 @@ def create_or_update_assign_sp_to_mediaservice(cmd, client, account_name, resour
104102
def _update_sp(cmd, graph_client, aad_sp, ams, account_name, resource_group_name, display_name,
105103
new_sp_name, role, years, sp_password, xml):
106104
profile = Profile(cli_ctx=cmd.cli_ctx)
107-
_, _, tenant_id = profile.get_login_credentials(
108-
resource=cmd.cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
105+
_, _, tenant_id = profile.get_login_credentials()
109106
sp_oid = aad_sp['id']
110107
app_id = aad_sp['appId']
111108
app_object_id = _get_application_object_id(graph_client, app_id)

0 commit comments

Comments
 (0)