Skip to content

Incompatible DCR Flow When registration_endpoint Requires Credentials (e.g., with Okta) #695

Description

@asparsh29kumar

Describe the bug
When following the Model Context Protocol (MCP) flow with support for [RFC 9728 - OAuth 2.0 Protected Resource Metadata], it appears that the use of dynamic client registration (DCR) is not compatible with authorization servers like Okta that require a pre-provisioned API key to access the registration_endpoint. As a result, even though the client correctly discovers the registration_endpoint via protected resource metadata and authorization server metadata, it cannot actually register dynamically — defeating the purpose of DCR in this context.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a protected resource (e.g., API) that advertises authorization_server metadata at /.well-known/oauth-protected-resource.
  2. Ensure the authorization server is Okta.
  3. Discover the registration_endpoint via Okta’s /.well-known/oauth-authorization-server.
  4. Attempt to register dynamically as a client without an API key.
  5. Observe that the request fails due to the lack of authorization (API key requirement).

Expected behavior
The client, after discovering the registration_endpoint through the standard metadata flows, should be able to perform dynamic registration without requiring out-of-band administrator credentials like an API key. The assumption behind DCR is that it allows dynamic, client-initiated onboarding — not manual administrative provisioning.

Additional context
This limitation seems to undermine the goal of using OAuth protected resource metadata to dynamically discover and register clients. If the authorization server’s DCR endpoint requires prior admin-level authorization (e.g., an API key), the dynamic nature is effectively broken.
Dynamic client registration in Okta according to Okta developer documentation:

curl -i -X GET \
  https://subdomain.okta.com/oauth2/v1/clients \
  -H 'Authorization: YOUR_API_KEY_HERE'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions