Skip to content

Commit a4fefe1

Browse files
committed
mi-username
1 parent 3bdbde3 commit a4fefe1

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

src/azure-cli/azure/cli/command_modules/profile/_breaking_change.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/azure-cli/azure/cli/command_modules/profile/custom.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ def login(cmd, username=None, password=None, tenant=None, scopes=None, allow_no_
133133
# quick argument usage check
134134
if any([password, service_principal, tenant]) and identity:
135135
raise CLIError("usage error: '--identity' is not applicable with other arguments")
136+
if identity and username:
137+
raise CLIError('Passing the managed identity ID with --username is no longer supported. '
138+
'Use --client-id, --object-id or --resource-id instead.')
136139
if any([password, service_principal, username, identity]) and use_device_code:
137140
raise CLIError("usage error: '--use-device-code' is not applicable with other arguments")
138141
if use_cert_sn_issuer and not service_principal:
@@ -152,9 +155,6 @@ def login(cmd, username=None, password=None, tenant=None, scopes=None, allow_no_
152155
if identity:
153156
if in_cloud_console():
154157
return profile.login_in_cloud_shell()
155-
if username:
156-
from azure.cli.core.breaking_change import print_conditional_breaking_change
157-
print_conditional_breaking_change(cmd.cli_ctx, tag='ManagedIdentityUsernameBreakingChange')
158158
return profile.login_with_managed_identity(
159159
client_id=client_id, object_id=object_id, resource_id=resource_id,
160160
allow_no_subscriptions=allow_no_subscriptions)

0 commit comments

Comments
 (0)