-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Profile] az account get-access-token: Add --client-id argument
#30301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @jiasli, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| account get-access-token | cmd account get-access-token added parameter client_id |
|
enables getting an access token for another first-party application |
| instance_discovery = cli_ctx.config.getboolean('core', 'instance_discovery', True) | ||
|
|
||
| return Identity(*args, encrypt=encrypt, use_msal_http_cache=use_msal_http_cache, | ||
| return Identity(authority, tenant_id=tenant_id, client_id=client_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, custom client ID has been supported by azure.cli.core.auth during the MSAL migration long ago (#19853). Identity takes the client_id=None keyword argument since the first day, but this feature is never exposed.
Related command
az account get-access-tokenDescription
Requires #30300
This PR enables getting an access token for another first-party application that can do single sign-on with Azure CLI. For example, to get an access token for Azure PowerShell:
Testing Guide