Skip to content

Conversation

@jiasli
Copy link
Member

@jiasli jiasli commented Nov 8, 2024

Update doc according to Azure/azure-cli#30283

@jiasli jiasli closed this Nov 8, 2024
@jiasli jiasli reopened this Nov 8, 2024
@jiasli jiasli marked this pull request as ready for review November 8, 2024 11:17

```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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full argument names should be preferred.

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 9661197:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 9661197:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-service-prod
Copy link
Contributor

Learn Build status updates of commit 5efda54:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View
docs-ref-conceptual/azure-cli-sp-tutorial-3.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@jiasli jiasli changed the title Update doc for service principal certificate auth Update doc for service principal certificate authentication Nov 11, 2024
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit b6cdc4b:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View
docs-ref-conceptual/azure-cli-sp-tutorial-3.md ✅Succeeded View
docs-ref-conceptual/upcoming-breaking-changes.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 433a5f0:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View
docs-ref-conceptual/azure-cli-sp-tutorial-3.md ✅Succeeded View
docs-ref-conceptual/upcoming-breaking-changes.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

@dcaro dcaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikefrobbins any thoughts on using $Cred.GetNetworkCredential vs $Cred.Password ?

@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit d7fb0de:

✅ Validation status: passed

File Status Preview URL Details
docs-ref-conceptual/authenticate-azure-cli-service-principal.md ✅Succeeded View
docs-ref-conceptual/azure-cli-sp-tutorial-3.md ✅Succeeded View
docs-ref-conceptual/upcoming-breaking-changes.md ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@jiasli jiasli merged commit 3f0b8d5 into MicrosoftDocs:main Nov 13, 2024
@jiasli jiasli deleted the login-cert branch November 13, 2024 08:20
@jiasli jiasli mentioned this pull request Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants