Skip to content

The client has requested access to a resource which is not listed in the requested permissions in the client's application registration. #33887

Open

Description

Describe the bug

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: api://ingestion.pensieve. Resource app ID: 242092bf-f250-404c-8db8-c6742842d9a1. List of valid resources from app registration: . Trace ID: a4123e99-7804-43ec-bc12-19f752001000 Correlation ID: a200ff84-77e6-4d70-9555-fd64eec05bd2 Timestamp: 2026-08-13 07:44:09Z. ($error_uri)

Related command

az logout
az login --tenant "05d75c05-fa1a-42e7-9cf1-eb416c396f2d" --scope "api://ingestion.pensieve/.default"

Errors

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: api://ingestion.pensieve. Resource app ID: 242092bf-f250-404c-8db8-c6742842d9a1. List of valid resources from app registration: . Trace ID: a4123e99-7804-43ec-bc12-19f752001000 Correlation ID: a200ff84-77e6-4d70-9555-fd64eec05bd2 Timestamp: 2026-08-13 07:44:09Z. ($error_uri)

Issue script & Debug output

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: api://ingestion.pensieve. Resource app ID: 242092bf-f250-404c-8db8-c6742842d9a1. List of valid resources from app registration: . Trace ID: a4123e99-7804-43ec-bc12-19f752001000 Correlation ID: a200ff84-77e6-4d70-9555-fd64eec05bd2 Timestamp: 2026-08-13 07:44:09Z. ($error_uri)

Expected behavior

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: api://ingestion.pensieve. Resource app ID: 242092bf-f250-404c-8db8-c6742842d9a1. List of valid resources from app registration: . Trace ID: a4123e99-7804-43ec-bc12-19f752001000 Correlation ID: a200ff84-77e6-4d70-9555-fd64eec05bd2 Timestamp: 2026-08-13 07:44:09Z. ($error_uri)

Environment Summary

(.venv) s.shindigeri@MMDH4K6W2F5YH scm-central-gitops % az --version
azure-cli 2.81.0 *

core 2.81.0 *
telemetry 1.1.0

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.81.0/libexec/bin/python'
Config directory '/Users/s.shindigeri/.azure'
Extensions directory '/Users/s.shindigeri/.azure/cliextensions'

Python (Darwin) 3.13.11 (main, Dec 5 2025, 16:06:33) [Clang 17.0.0 (clang-1700.4.4.1)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

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: api://ingestion.pensieve. Resource app ID: 242092bf-f250-404c-8db8-c6742842d9a1. List of valid resources from app registration: . Trace ID: a4123e99-7804-43ec-bc12-19f752001000 Correlation ID: a200ff84-77e6-4d70-9555-fd64eec05bd2 Timestamp: 2026-08-13 07:44:09Z. ($error_uri)

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Aug 13, 2026
  2. azure-client-tools-bot-prd commented on Aug 13, 2026

    @azure-client-tools-bot-prd

    Hi shivashankar shindigeri (@shiva731),

    2.81.0 is not the latest Azure CLI(2.89.1).

    If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

  3. yonzhan commented on Aug 13, 2026

    @yonzhan
    Collaborator

    Thank you for opening this issue, we will look into it.

  4. x-engineering-agent commented on Aug 13, 2026

    @x-engineering-agent
    Contributor

    Hi Yong Zhang (@yonzhan), thanks for the report. Before we can investigate, could you help clarify a few things:

    • Expected behavior: What did you expect az login --tenant "05d75c05-..." --scope "api://ingestion.pensieve/.default" to do? The current 'Expected behavior' section just repeats the error text, so it's not clear what the desired outcome is.
    • Is api://ingestion.pensieve a custom/first-party API you registered yourself, or is it expected to work out of the box with the public Azure CLI client app (04b07795-8ddb-461a-bbee-02f9e1bf7b46)? AADSTS650057 typically means the target resource's app registration hasn't exposed/granted that scope to the Azure CLI client app ID, which is usually an app registration/tenant configuration issue rather than a CLI bug.
    • If this is a custom resource, has an admin added the Azure CLI app as an authorized client application for api://ingestion.pensieve and consented to the requested scope?
    • Does az login --scope <resource>/.default work for other resources in the same tenant, or only this one fails?

    I'll pick this up automatically once you reply.


    Posted by agent-assist (autonomous bug-fix pipeline).

  5. added this to the Backlog milestone on Aug 13, 2026
  6. x-engineering-agent commented on Aug 16, 2026

    @x-engineering-agent
    Contributor

    Hi shivashankar shindigeri (@shiva731), just following up on the questions above since we haven't heard back:

    • Expected behavior: What did you expect az login --tenant "05d75c05-fa1a-42e7-9cf1-eb416c396f2d" --scope "api://ingestion.pensieve/.default" to do? The 'Expected behavior' section currently just repeats the error text, so it's unclear what outcome you were hoping for.
    • Is api://ingestion.pensieve a custom/first-party API you registered yourself, or is it expected to work out of the box with the public Azure CLI app registration (04b07795-8ddb-461a-bbee-02f9e1bf7b46)?
    • Have you tried upgrading to the latest Azure CLI (2.89.1) as suggested, and does the issue still occur?

    If we don't hear back, we may not be able to make further progress on this issue. Thanks!


    Posted by agent-assist (autonomous bug-fix pipeline).

  7. x-engineering-agent commented on Oct 25, 2026

    @x-engineering-agent
    Contributor

    Hi shivashankar shindigeri (@shiva731), the error shows Azure CLI's public client requesting access to a custom api:// resource for which that client has no registered permissions. An Azure CLI maintainer clarified the same AADSTS650057 case in #32579: the CLI's client ID is not supported for calling third-party applications.

    Next step: If this is your API, register a client application you control, grant it access to the API and obtain the token through that client instead of using az login --scope with Azure CLI's public client. The sandbox cannot access your tenant-specific API to reproduce its configuration, so this is guidance based on the reported error and that maintainer answer, not a verified live reproduction. There is no CLI code change indicated by the available evidence.

    Posted by x-engineering-agent (Fixer)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Auto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teambugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions