Azure / Azure/azure-cli

[Feature Request] Support custom client ID

Open
#22,775 20 comments 32 reactions 1 assignee Claimed by @jiasli View on GitHub
AAD Account act-identity-squad Auto-Assign Feature Candidate feature-request Graph
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**
`az login`

**Is your feature request related to a problem? Please describe.**
Currently Azure CLI uses a fixed client ID to authenticate into AAD

https://github.com/Azure/azure-cli/blob/1d973cceb38980181eeaa45934497d2148a3e7b2/src/azure-cli-core/azure/cli/core/auth/identity.py#L22

This client ID `04b07795-8ddb-461a-bbee-02f9e1bf7b46` is a First Party Application, registered in First Party Portal.

This application is only pre-authorized for a limited set of [Microsoft Graph permissions](https://docs.microsoft.com/en-us/graph/permissions-reference). Using Azure CLI command `az rest` to call [trustFrameworkKeySet](https://docs.microsoft.com/en-us/graph/api/trustframeworkkeyset-get?view=graph-rest-beta&tabs=http) API which requires **TrustFrameworkKeySet.Read.All**, **TrustFrameworkKeySet.ReadWrite.All** will fail (https://github.com/Azure/azure-cli/issues/22755).

**Describe the solution you'd like**
Support custom client ID, so that users can create their own app in their tenant, consent to that app and let Azure CLI use that app’s client ID:

```
az login --client-id
```

**Describe alternatives you've considered**
Apply for those permissions in First Party Portal to support these APIs.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.