{Profile} az login: Update examples and history note#30291
Merged
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @jiasli, |
️✔️AzureCLI-BreakingChangeTest
|
Collaborator
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
jiasli
commented
Nov 8, 2024
| - name: Log in with username and password. This doesn't work with Microsoft accounts or accounts that have two-factor authentication enabled. Use -p=secret if the first character of the password is '-'. | ||
| text: az login -u johndoe@contoso.com -p VerySecret | ||
| - name: Log in with a service principal using client secret. Use -p=secret if the first character of the password is '-'. | ||
| text: az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com |
Member
Author
There was a problem hiding this comment.
Since #18312, identifierUris such as http://azure-cli-2016-08-05-14-31-15 are no longer set on the service principal created by az ad sp create-for-rbac, so it cannot be used as --username. Only App ID works now.
jiasli
commented
Nov 11, 2024
| text: az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p VerySecret --tenant contoso.onmicrosoft.com | ||
| text: az login --username johndoe@contoso.com --password VerySecret | ||
| - name: Log in with a service principal using client secret. Use --password=secret if the first character of the password is '-'. | ||
| text: az login --service-principal --username APP_ID --password CLIENT_SECRET --tenant TENANT_ID |
Member
Author
There was a problem hiding this comment.
TENANT_ID is preferred. Otherwise, a domain name will trigger the extra tenant discovery process:
az login: Update examplesaz login: Update examples and history note
jiasli
commented
Nov 11, 2024
| **Profile** | ||
|
|
||
| * `az login`: Passing the service principal certificate with `--password` is deprecated and will be removed by version 2.74. Please use `--certificate` instead. (#30091) | ||
| * `az login`: Passing the service principal certificate with `--password` is deprecated and will be removed in version 2.67.0. Please use `--certificate` instead. (#30091) |
Member
Author
There was a problem hiding this comment.
Changed to align with MicrosoftDocs/azure-docs-cli#4727.
evelyn-ys
approved these changes
Nov 12, 2024
bebound
approved these changes
Nov 12, 2024
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 loginDescription
To align with MicrosoftDocs/azure-docs-cli#4756