Skip to content
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

Why client_id value is always the same? #18008

Closed
michalswi opened this issue Apr 13, 2021 · 3 comments
Closed

Why client_id value is always the same? #18008

michalswi opened this issue Apr 13, 2021 · 3 comments
Assignees
Labels
Azure.Identity customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@michalswi
Copy link

I am wonder why client_id value if I don't use specific Service Principal is always the same?
client_id=04b07795-8ddb-461a-bbee-02f9e1bf7b46
doesn't matter if I use az cli or terraform.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Apr 13, 2021
@chlowell chlowell added Azure.Identity and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Apr 13, 2021
@chlowell chlowell self-assigned this Apr 13, 2021
@chlowell
Copy link
Member

client_id here is the ID of the Azure AD application the credential will authenticate users to, not a service principal (this document describes the relationship between applications and service principals). The value shown in the documentation is only the default; it is configurable:

# this credential will authenticate users to 04b07795-8ddb-461a-bbee-02f9e1bf7b46 (Azure CLI)
DeviceCodeCredential()

# this credential will authenticate users to MY_APPLICATION
DeviceCodeCredential(client_id=MY_APPLICATION)

@chlowell chlowell added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Apr 13, 2021
@michalswi
Copy link
Author

All I want to understand here is why if I don't specify my own client_id I will always have client_id with this specific value 04b07795-8ddb-461a-bbee-02f9e1bf7b46 so this value is the default value for Azure AD or what?

@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. labels Apr 14, 2021
@chlowell
Copy link
Member

As I wrote above, this is the client ID for the Azure CLI. The login page also points that out: "You're signing in to Microsoft Azure Cross-platform Command Line Interface on another device...". We use it as a default because Azure AD doesn't have a default--a user must authenticate to some specific application. The Azure CLI is a good default for us because we can assume it's registered in a user's tenant and has access to the APIs our clients use.

@chlowell chlowell added needs-author-feedback Workflow: More information is needed from author to address the issue. and removed needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Apr 14, 2021
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Mar 29, 2022
Rebase Microsoft.SQL in Main Branch (Azure#18428)

* Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* update sql default tag to composite-v5 (Azure#17143)

* Updated Blob Auditing API Files (Azure#17355)

* Updated Blob Auditing API Files

* Fixed new property name case

* fixing x-ms-enum lint warning

Co-authored-by: Mukesh Dogra <[email protected]>

* Adding swagger for endpoint certificates (Azure#17156)

* Adding swagger for endpoint certificates

* Fix the year

* Fix build error on the pull request

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (Azure#17881)

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs

* Fix to Swagger ModelValidation failures

* Removing the 201 from Database Upsert operation since it is not a long running operation.

* Change the name of the API to AdvancedThreatProtectionSettings

* Fix to the renaming to AdvancedThreatProtectionSettings

* Remove old files

* Adding ManagedServerDnsAliases API endpoints (Azure#18008)

* change

* Update readme.md

* error 201

* Revert "Update readme.md"

This reverts commit ceff39a406eefda1ed38c6188fd9d2eb271053ab.

* Revert "error 201"

This reverts commit 759fa4f92e9967d72060485aa36d7a1b62a9d227.

* Fixed bad reverts

Co-authored-by: Ji Wang <[email protected]>

* Add 201 response example so SQL clients can work correctly (Azure#18121)

* Add examples for cross sub restore (Azure#18135)

* Release Microsoft.sql 2021 11 01 preview (Azure#18005)

* update swagger files and example files

* update readme.md

* address the pipeline error.

* update the reference.

* address the pipeline error

* address x-ms-secret comments

* update error message

* revert the deleted legacy files; avoid breaking changes.

* remove example files and reference.

* remove secret

* Adds base for updating Microsoft.Sql from version preview/2021-08-01-preview to version 2021-11-01-preview

* Updates readme

* Updates API version in new specs and examples

* update sql default tag to composite-v5 (Azure#17143)

* Updated Blob Auditing API Files (Azure#17355)

* Updated Blob Auditing API Files

* Fixed new property name case

* fixing x-ms-enum lint warning

Co-authored-by: Mukesh Dogra <[email protected]>

* Adding swagger for endpoint certificates (Azure#17156)

* Adding swagger for endpoint certificates

* Fix the year

* Fix build error on the pull request

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs (Azure#17881)

* Microsoft.Sql - adding Database and Server AdvancedThreatProtection APIs

* Fix to Swagger ModelValidation failures

* Removing the 201 from Database Upsert operation since it is not a long running operation.

* Change the name of the API to AdvancedThreatProtectionSettings

* Fix to the renaming to AdvancedThreatProtectionSettings

* Remove old files

* update swagger files and example files

* update readme.md

* address the pipeline error.

* resolove the conflict

* address the pipeline error

* address x-ms-secret comments

* update error message

* revert the deleted legacy files; avoid breaking changes.

* remove example files and reference.

* remove secret

Co-authored-by: Zhenglai Zhang <[email protected]>
Co-authored-by: msdogra <[email protected]>
Co-authored-by: Mukesh Dogra <[email protected]>
Co-authored-by: srmarkov <[email protected]>
Co-authored-by: Uriel Cohen <[email protected]>
Co-authored-by: Marko Nikolic <[email protected]>
Co-authored-by: Andrija Cicovic <[email protected]>
Co-authored-by: Ishan Rajesh Madan <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants