Update doc for service principal certificate authentication#4756
Update doc for service principal certificate authentication#4756jiasli merged 2 commits intoMicrosoftDocs:mainfrom
Conversation
|
|
||
| ```azurecli-interactive | ||
| az login --service-principal -u <app-id> -p <password-or-cert> --tenant <tenant> | ||
| az login --service-principal --username APP_ID --certificate /path/to/cert.pem --tenant TENANT_ID |
There was a problem hiding this comment.
Full argument names should be preferred.
|
Learn Build status updates of commit 9661197: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
|
Learn Build status updates of commit 9661197: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
| --username myServicePrincipalID \ | ||
| --tenant myOwnerOrganizationId \ | ||
| --password /path/to/cert | ||
| az login --service-principal --username APP_ID --certificate /path/to/cert.pem --tenant TENANT_ID |
There was a problem hiding this comment.
This is not a very long command, so no need to break it into several lines.
| --username myServicePrincipalID \ | ||
| --tenant myOwnerOrganizationId \ | ||
| --password /path/to/cert | ||
| az login --service-principal --username APP_ID --certificate /path/to/cert.pem --tenant TENANT_ID |
There was a problem hiding this comment.
Also, the placeholders are changed to align with those in docs-ref-conceptual/authenticate-azure-cli-service-principal.md.
| --encoding base64 | ||
| openssl pkcs12 -in cert.pfx -passin pass: -passout pass: -out cert.pem -nodes | ||
|
|
||
| az login --service-principal -u "<myAppClientID>" -p cert.pem --tenant "<myTenantID>" |
There was a problem hiding this comment.
No need to mention az login command here. It is later mentioned in "Sign in with a service principal using a certificate" section.
|
Learn Build status updates of commit 5efda54: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
|
Learn Build status updates of commit b6cdc4b: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
|
Learn Build status updates of commit 433a5f0: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
dcaro
left a comment
There was a problem hiding this comment.
Please look at my comments
| > ```powershell | ||
| > $AzCred = Get-Credential -UserName <app-id> | ||
| > az login --service-principal -u $AzCred.UserName -p $AzCred.GetNetworkCredential().Password --tenant <tenant> | ||
| > az login --service-principal --username $AzCred.UserName --password $AzCred.GetNetworkCredential().Password --tenant <tenant> |
There was a problem hiding this comment.
@mikefrobbins any thoughts on using $Cred.GetNetworkCredential vs $Cred.Password ?
Co-authored-by: Damien Caro <dcaro@microsoft.com>
|
Learn Build status updates of commit d7fb0de: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Update doc according to Azure/azure-cli#30283