[Profile] az account get-access-token: Add --client-id argument#30301
Draft
[Profile] az account get-access-token: Add --client-id argument#30301
az account get-access-token: Add --client-id argument#30301Conversation
️✔️AzureCLI-FullTest
|
|
Hi @jiasli, |
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| account get-access-token | cmd account get-access-token added parameter client_id |
Collaborator
|
enables getting an access token for another first-party application |
jiasli
commented
Nov 11, 2024
| 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, |
Member
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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