Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,8 @@ def parse_secret_flags(secret_list):


def get_linker_client(cmd):
resource = cmd.cli_ctx.cloud.endpoints.active_directory_resource_id
profile = Profile(cli_ctx=cmd.cli_ctx)
credential, subscription_id, _ = profile.get_login_credentials(
subscription_id=get_subscription_id(cmd.cli_ctx), resource=resource)
Copy link
Member Author

@jiasli jiasli Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resource will be dropped by Track 1 SDK authentication removal (#29631).

get_mgmt_service_client takes care of passing credential_scopes.

linker_client = ServiceLinkerManagementClient(credential)
return linker_client
from azure.cli.core.commands.client_factory import get_mgmt_service_client
return get_mgmt_service_client(cmd.cli_ctx, ServiceLinkerManagementClient)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic of get_subscription_id is already covered by get_mgmt_service_client.



def validate_binding_name(binding_name):
Expand Down