Skip to content

Commit

Permalink
ams
Browse files Browse the repository at this point in the history
  • Loading branch information
jiasli committed Feb 10, 2025
1 parent a00a332 commit d5c45d9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/azure-cli/azure/cli/command_modules/ams/operations/sp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ def reset_sp_credentials_for_mediaservice(cmd, client, account_name, resource_gr
sp_oid = aad_sp['id'] # pylint: disable=unsubscriptable-object

profile = Profile(cli_ctx=cmd.cli_ctx)
_, _, tenant_id = profile.get_login_credentials(
resource=cmd.cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
_, _, tenant_id = profile.get_login_credentials()

subscription_id = get_subscription_id(cmd.cli_ctx)

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

profile = Profile(cli_ctx=cmd.cli_ctx)
_, _, tenant_id = profile.get_login_credentials(
resource=cmd.cli_ctx.cloud.endpoints.active_directory_graph_resource_id)
_, _, tenant_id = profile.get_login_credentials()
created_password = add_sp_password(graph_client, entity_name_string='password', app_id=app_object_id,
password_display_name=password_display_name, years=years)

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

0 comments on commit d5c45d9

Please sign in to comment.