Azure / Azure/azure-cli

az login errors

Open
#31,051 2 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad Auto-Assign Azure CLI Team customer-reported Possible-Solution question Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

Authentication failed
invalid_client: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 04b07795-8ddb-461a-bbee-02f9e1bf7b46(Microsoft Azure CLI). Resource value from request: 41abc0c6-712d-4619-9b79-b96da7ffa825. Resource app ID: 41abc0c6-712d-4619-9b79-b96da7ffa825. List of valid resources from app registration: . Trace ID: de524dc9-4927-4f65-8c59-f11b7af60300 Correlation ID: c79164f6-30cb-4b7d-8b6f-710c4d5a3874 Timestamp: 2025-03-17 09:45:01Z. ($error_uri)

You can log an issue at [Azure CLI GitHub Repository](https://github.com/azure/azure-cli/issues) and we will assist you in resolving it.

### Related command

(base) naveenp@Naveens-MacBook-Pro-2 ~ % kubectl config set-context --current --namespace=ns-team-project-hummingbird--conversation-decision-en-f371c8d0
Context "ethos11-stage-va7" modified.
(base) naveenp@Naveens-MacBook-Pro-2 ~ % kubectl get pods
Error: failed to get token: expected an empty error but received: AzureCLICredential: ERROR: AADSTS65001: The user or administrator has not consented to use the application with ID '04b07795-8ddb-461a-bbee-02f9e1bf7b46' named 'Microsoft Azure CLI'. Send an interactive authorization request for this user and resource. Trace ID: 45ba9eab-905f-4ec5-a7a3-e440f6b53100 Correlation ID: 717058a9-4b38-49ca-9a57-ce7dbc793e0d Timestamp: 2025-03-17 09:41:55Z
Interactive authentication is needed. Please run:
az login --scope 41abc0c6-712d-4619-9b79-b96da7ffa825/.default
(base) naveenp@Naveens-MacBook-Pro-2 ~ % az login --scope 41abc0c6-712d-4619-9b79-b96da7ffa825/.default

### Errors

Authentication failed
invalid_client: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. Client app ID: 04b07795-8ddb-461a-bbee-02f9e1bf7b46(Microsoft Azure CLI). Resource value from request: 41abc0c6-712d-4619-9b79-b96da7ffa825. Resource app ID: 41abc0c6-712d-4619-9b79-b96da7ffa825. List of valid resources from app registration: . Trace ID: de524dc9-4927-4f65-8c59-f11b7af60300 Correlation ID: c79164f6-30cb-4b7d-8b6f-710c4d5a3874 Timestamp: 2025-03-17 09:45:01Z. ($error_uri)

You can log an issue at [Azure CLI GitHub Repository](https://github.com/azure/azure-cli/issues) and we will assist you in resolving it.

### Issue script & Debug output

(base) naveenp@Naveens-MacBook-Pro-2 ~ % kubectl config set-context --current --namespace=ns-team-project-hummingbird--conversation-decision-en-f371c8d0
Context "ethos11-stage-va7" modified.

(base) naveenp@Naveens-MacBook-Pro-2 ~ % kubectl get pods
Error: failed to get token: expected an empty error but received: AzureCLICredential: ERROR: AADSTS65001: The user or administrator has not consented to use the application with ID '04b07795-8ddb-461a-bbee-02f9e1bf7b46' named 'Microsoft Azure CLI'. Send an interactive authorization request for this user and resource. Trace ID: 45ba9eab-905f-4ec5-a7a3-e440f6b53100 Correlation ID: 717058a9-4b38-49ca-9a57-ce7dbc793e0d Timestamp: 2025-03-17 09:41:55Z
Interactive authentication is needed. Please run:
az login --scope 41abc0c6-712d-4619-9b79-b96da7ffa825/.default

(base) naveenp@Naveens-MacBook-Pro-2 ~ % az login --scope 41abc0c6-712d-4619-9b79-b96da7ffa825/.default

### Expected behavior

kubectl get pods should list all pods in a namespace

### Environment Summary

azure-cli

### Additional context

_No response_

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.