Skip to content
Kong Docs are moving soon! Our docs are migrating to a new home. You'll be automatically redirected to the new site in the future. In the meantime, view this page on the new site!
Kong Logo | Kong Docs Logo
  • Docs
    • Explore the API Specs
      View all API Specs View all API Specs View all API Specs arrow image
    • Documentation
      API Specs
      Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong AI Gateway
      Multi-LLM AI Gateway for GenAI infrastructure
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      AI's icon
      AI
      Govern, secure, and control AI traffic with multi-LLM AI Gateway plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Konnect
  • Home icon
  • Kong Konnect
  • Dev Portal
  • Applications
  • Dynamic Client Registration
  • Auth0
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Kong AI Gateway
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
  • Introduction
    • Overview of Konnect
    • Architecture
    • Network Resiliency and Availability
    • Port and Network Requirements
    • Private Connections to Other Cloud Providers
      • Create a private connection with AWS PrivateLink
    • Geographic Regions
    • Centralized consumer management
    • Compatibility
    • Stages of Software Availability
    • Release Notes
    • Support
      • Control Plane Upgrades FAQ
      • Supported Installation Options
  • Get Started
    • Overview
    • Add your API
    • Migrating a Self-Managed Kong Gateway into Konnect
  • Gateway Manager
    • Overview
    • Dedicated Cloud Gateways
      • Overview
      • Provision a Dedicated Cloud Gateway
      • Securing Backend Traffic
      • Transit Gateways
      • Azure VNET Peering
      • Custom Domains
      • Custom Plugins
      • Data plane logs
    • Serverless Gateways
      • Overview
      • Provision a serverless Gateway
      • Securing Backend Traffic
      • Custom Domains
    • Data Plane Nodes
      • Installation Options
      • Upgrade a Data Plane Node
      • Verify a Data Plane Node
      • Secure Control Plane/Data Plane Communications
      • Renew Data Plane Certificates
      • Parameter Reference
      • Using Custom DP Labels
    • Control Plane Groups
      • Overview
      • Working with Control Plane Groups
      • Migrate Configuration into Control Plane Groups
      • Conflicts in Control Planes
    • Kong Gateway Configuration in Konnect
      • Overview
      • Manage Plugins
        • Overview
        • Adding Custom Plugins
        • Updating Custom Plugins
        • How to Create Custom Plugins
      • Create Consumer Groups
      • Secrets Management
        • Overview
        • Konnect Config Store
        • Set Up and Use a Vault in Konnect
      • Manage Control Plane Configuration with decK
    • Active Tracing
      • Overview
    • KIC Association
    • Backup and Restore
    • Version Compatibility
    • Troubleshooting
  • Mesh Manager
    • Overview
    • Create a mesh with the Kubernetes demo app
    • Federate a zone control plane to Konnect
    • Migrate a self-managed zone control plane to Konnect
  • Service Catalog
    • Overview
    • Integrations
      • Overview
      • Datadog
      • GitHub
      • GitLab
      • PagerDuty
      • SwaggerHub
      • Traceable
      • Slack
    • Scorecards
  • API Products
    • Overview
    • Product Documentation
    • Productize a Service
  • Dev Portal
    • Overview
    • Dev Portal Configuration Preparation
    • Create a Dev Portal
    • Sign Up for a Dev Portal Account
    • Publish an API to Dev Portal
    • Access and Approval
      • Manage Developer Access
      • Manage Developer Team Access
      • Add Developer Teams from IdPs
      • Manage Application Registrations
      • Configure generic SSO for Dev Portal
      • Configure Okta SSO for Dev Portal
    • Application Lifecycle
    • Register and create an application as a developer
    • Enable and Disable App Registration for API Product Versions
    • Dynamic Client Registration
      • Overview
      • Okta
      • Curity
      • Auth0
      • Azure
      • Custom IdP
    • Portal Management API Automation Guide
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Portal Customization
      • Overview
      • About Self-Hosted Dev Portal
      • Host your Dev Portal with Netlify
      • Custom Domains
    • Dev Portal SDK
    • Troubleshoot
  • Advanced Analytics
    • Overview
    • Dashboard
    • Explorer
    • Analyze API Usage and Performance with Reports
    • Requests
  • Org Management
    • Plans and Billing
    • Authentication and Authorization
      • Overview
      • Teams
        • Overview
        • Manage Teams
        • Teams Reference
        • Roles Reference
      • Manage Users
      • Manage System Accounts
      • Personal Access Tokens
      • Social Identity Login
      • Org Switcher
      • Configure Generic SSO
      • Configure Okta SSO
      • Login Sessions Reference
      • Troubleshoot
    • Audit Logging
      • Overview
      • Set up an Audit Log Webhook
      • Set up an Audit Log Replay Job
    • Account and Org Deactivation
  • API
    • Overview
    • API Request API (Beta)
      • API Spec
    • API Products API
      • API Spec
    • Audit Logs API
      • API Spec
      • Audit Log Webhooks
    • Control Plane API
      • API Spec
    • Control Plane Configuration API
      • API Spec
    • Cloud Gateways API
      • API Spec
    • Identity API
      • API Spec
      • Identity Integration Guide
      • SSO Customization
    • Konnect Search API (Beta)
      • API Spec
    • Mesh Manager API
      • API Spec
      • Kong Mesh API Reference
    • Portal Client API
      • API Spec
    • Portal Management API
      • API Spec
    • Reference
      • Filtering
      • API Errors
  • Reference
    • Labels
    • Plugin Ordering Reference
    • Konnect Search
    • Terraform Provider
    • Audit Logs
    • Verify audit log signatures
    • IdP SAML attribute mapping
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Prerequisites
  • Configure Auth0
    • Configure access to the Auth0 Management API
    • Configure the API audience
  • Configure the Dev Portal
  • Create an application with DCR
  • Make a successful request
  • Using Auth0 actions
Looking for the new Developer Portal beta docs? Try the beta now.

Configure Auth0 for Dynamic Client Registration

Prerequisites

  • Enterprise Konnect account.
  • An Auth0 account

Note: When using Auth0 DCR for Dev Portal, each application in Auth0 will have the following metadata. This can be viewed via the auth0 dashboard, or accessed from the Auth0 API.

  • konnect_portal_id: ID of the Portal the application belongs to
  • konnect_developer_id: ID of the developer in the Dev Portal that this application belongs to
  • konnect_org_id: ID of the Konnect Organization the application belongs to
  • konnect_application_id: ID of the application in the Dev Portal

Configure Auth0

To use dynamic client registration (DCR) with Auth0 as the identity provider (IdP), there are two important configurations to prepare in Auth0. First, you must authorize an Auth0 application so Konnect can use the Auth0 Management API on your behalf. Next, you will create an API audience that Konnect applications will be granted access to.

To get started configuring Auth0, log in to your Auth0 dashboard and complete the following:

Configure access to the Auth0 Management API

Konnect will use a client ID and secret from an Auth0 application that has been authorized to perform specific actions in the Auth0 Management API.

  1. From the sidebar, select Applications > Applications

  2. Click the Create Application button

  3. Give the application a memorable name, like “Konnect Portal DCR Admin”

  4. Select the application type Machine to Machine Applications and click create

  5. Authorize the application to access the Auth0 Management API by selecting it from the dropdown. It will have a URL of the pattern https://AUTH0_TENANT_SUBDOMAIN.REGION.auth0.com/api/v2/

  6. In the Permissions section, ensure you have selected the following permissions to be granted and click authorize:
    • read:client_grants
    • create:client_grants
    • delete:client_grants
    • update:client_grants
    • read:clients
    • create:clients
    • delete:clients
    • update:clients
    • update:client_keys

    Note: If you’re using Developer Managed Scopes, add read:resource_servers to the permissions for your initial client application.

  7. On the application’s page, visit the Settings tab and note where you can view the values for Client ID and Client Secret, which you will use in a later step.

Configure the API audience

Note: You can use an existing API entity if there is one already defined in Auth0 that represents the audience you are/will be serving with Konnect Dev Portal applications. In most cases, it is a good idea to create a new API that is specific to your Konnect Portal applications.

To create a new API audience:

  1. From the sidebar, select Applications > APIs

  2. Click the Create API button

  3. Give the API a name, like “Konnect Portal Applications”

  4. Set the identifier to a value that represents the audience the API is serving

  5. Click create

  6. Note the identifier value used above, which is also known as the audience, as it will be used as the Audience value when configuring the auth strategy in Konnect

Configure the Dev Portal

Once you have Auth0 configured, you can configure the Dev Portal to use Auth0 for Dynamic Client Registration (DCR). This process involves two steps: creating the DCR provider and establishing the authentication strategy. DCR providers are designed to be reusable configurations. This means once you’ve configured the Auth0 DCR provider, it can be utilized across multiple authentication strategies without needing to be set up again.

Konnect UI
API
  1. Sign in to Konnect, then select dev-portal icon Dev Portal from the menu.

  2. Navigate to Application Auth to access the authentication settings for your API products.

  3. Open DCR providers to view all configured DCR providers.

  4. Select New DCR provider to create an Auth0 configuration. Provide a name for internal use in Konnect. The name and provider type information will not be exposed to Dev Portal developers.

  5. Input the Issuer URL of your Auth0 tenant, formatted as: https://AUTH0_TENANT_SUBDOMAIN.us.auth0.com. Do not include a forward slash at the end of the URL.

    Note: You can find the value for your AUTH0_TENANT_SUBDOMAIN by checking the Tenant Name under Settings > General.

  6. Choose Auth0 as the Provider Type.

  7. Input the Client ID of the previously created admin application in Auth0 into the Initial Client ID field. input the Client Secret of the same Auth0 admin application into the Initial Client Secret field. The Initial client secret will be stored in isolated, encrypted storage and will not be readable through any Konnect API.

  8. If you are using a custom domain for Auth0, enter the audience of the initial client as the Client Audience. Otherwise, leave this field blank.

  9. Optional: If you are using developer-managed scopes, select the Use Developer Managed Scopes checkbox.

  10. Save the DCR provider. You should now see it in the list of DCR providers.

  11. Click the Auth Strategy tab to see all of the auth strategies. Select New Auth Strategy to create an auth strategy that uses the DCR provider you created.

  12. Enter a name for internal use in Konnect and a display name that will be displayed in Dev Portal. In the Auth Type dropdown menu select DCR. In the DCR provider dropdown, select the name of the DCR provider config you created. Your Issuer URL will be prepopulated with the Issuer URL you added to the DCR provider.

  13. Enter the mandatory openid scope into the Scopes field in addition to any other scopes your developers may need access to (for example, openid, read:account_information, write:account_information). If you’re using developer-managed scopes, these are the scopes your developers will be able to choose from in Dev Portal.

  14. Enter azp into the Credential Claims field, which will match the client ID of each Auth0 application

  15. Enter the value audience field of your associated Auth0 API in the Audience field. If you’re using developer managed scopes, scopes selected by the developer should be in this audience.

  16. Choose the required Auth Methods (client_credentials, bearer, session) and save.

  1. Start by creating the DCR provider. Send a POST request to the dcr-providers endpoint with your DCR configuration details:
    curl --request POST \
    --url https://us.api.konghq.com/v2/dcr-providers \
    --header 'Authorization: $KPAT' \
    --header 'content-type: application/json' \
    --data '{
    "name": "Auth0 DCR Provider",
    "provider_type": "auth0",
    "issuer": "https://my-issuer.auth0.com/api/v2/",
    "dcr_config": {
       "initial_client_id": "abc123",
       "initial_client_secret": "abc123xyz098!",
       "initial_client_audience": "https://my-custom-domain.com/api/v2/"
    }
    }'
    

    You will receive a response that includes a dcr_provider object similar to the following:

    {
       "created_at": "2024-02-29T23:38:00.861Z",
       "updated_at": "2024-02-29T23:38:00.861Z",
       "id": "93f8380e-7798-4566-99e3-2edf2b57d289",
       "name": "Auth0 DCR Provider",
       "provider_type": "auth0",
       "issuer": "https://my-issuer.auth0.com/api/v2/",
       "dcr_config": {
          "initial_client_id": "abc123",
          "initial_client_audience": "https://my-custom-domain.com/api/v2/"
       },
       "active": false
    }
    
    

    Save the id value for creating the authentication strategy.

  2. With the dcr_id obtained from the first step, create an authentication strategy. Send a POST request to the create-auth-strategies endpoint describing an authentication strategy:

    curl --request POST \
    --url https://us.api.konghq.com/v2/application-auth-strategies \
    --header 'Authorization: $KPAT' \
    --header 'content-type: application/json' \
    --data '{
    "name": "Auth0 Auth",
    "display_name": "Auth0 Auth",
    "strategy_type": "openid_connect",
    "configs": {
       "openid-connect": {
          "issuer": "https://my-issuer.auth0.com/api/v2/",
          "credential_claim": [
          "client_id"
          ],
          "scopes": [
          "openid",
          "email"
          ],
          "auth_methods": [
          "client_credentials",
          "bearer"
          ]
       }
    },
    "dcr_provider_id": "93f8380e-7798-4566-99e3-2edf2b57d289"
    }'
    

Create an application with DCR

From the My Apps page in the Dev Portal, follow these instructions:

  1. Click New App.

  2. Fill out the Create New Application form with your application name, authentication strategy, and description.

  3. Click Create to save your application.

  4. After your application is created, you will see the Client ID and Client Secret. Store the Client Secret, it will only be shown once.

  5. Click Proceed to continue to the application’s details page.

Make a successful request

In the previous steps, you obtained the Client ID and Client Secret. To authorize the request, you must attach this client secret pair in the header. You can do this by using any API product, such as Insomnia, or directly using the command line:

curl example.com/REGISTERED_ROUTE -H "Authorization: Basic CLIENT_ID:CLIENT_SECRET"

Where example.com is the address of the runtime instance you are running.

Using Auth0 actions

Auth0 actions can be used to customize the application in Auth0. Using Auth0 actions, you can configure the application name in Auth0 to be something custom, instead of the default name set by the developer in the Dev Portal. Here’s an example that sets the application name to be konnect_portal_id+konnect_developer_id+konnect_application_id. For some other actions it is possible to make changes directly via the api object passed to the onExecuteCredentialsExchange.

  1. Follow the Auth0 documentation to create a custom action on the “Machine to Machine” flow.

  2. Use the following code as an example for what your action could look like. Update the initial const variables with the values from the when you configured DCR.

    
    const axios = require("axios");
    
    const INITIAL_CLIENT_AUDIENCE = 
    const INITIAL_CLIENT_ISSUER = 
    const INITIAL_CLIENT_ID = 
    const INITIAL_CLIENT_SECRET = 
    
    exports.onExecuteCredentialsExchange = async (event, api) => {
       const metadata = event.client.metadata
       if (!metadata.konnect_portal_id) {
          return
       }
       const newClientName = `${metadata.konnect_portal_id}+${metadata.konnect_developer_id}+${metadata.konnect_application_id}`
       await updateApplication(event.client.client_id, {
          name: newClientName
       })
    };
    
    async function getShortLivedToken() {
       const tokenEndpoint = new URL('/oauth/token', INITIAL_CLIENT_ISSUER).href
       const headers = {
          'Content-Type': 'application/json',
       }
    
       const payload = {
          client_id: INITIAL_CLIENT_ID,
          client_secret: INITIAL_CLIENT_SECRET,
          audience: INITIAL_CLIENT_AUDIENCE,
          grant_type: 'client_credentials'
       }
    
       const result = await
       axios.post(`${tokenEndpoint}`, payload, {
          headers
       })
       .then(x => x.data)
       .catch(e => {
          const msg = 'Unable to create one time access token'
          throw new Error(msg)
       })
    
       if (!result.access_token) {
          const msg = 'Unable to find one time access token from result'
          throw new Error(msg)
       }
    
       return result.access_token
    }
    
    async function updateApplication(clientId, update) {
       const shortLivedToken = await getShortLivedToken()
       const getApplicationEndpoint = new URL(`/api/v2/clients/${clientId}`, INITIAL_CLIENT_ISSUER).href
       const headers = makeHeaders(shortLivedToken)
    
    
       return await axios.patch(getApplicationEndpoint,
          update,
          { headers })
          .catch(e => {
             const msg = `Unable to update Application from auth0 ${e}`
             throw new Error(msg)
          })
    }
    
    function makeHeaders(token) {
       return {
          Authorization: `Bearer ${token}`,
          accept: 'application/json',
          'Content-Type': 'application/json'
       }
    }
    
  3. Be sure to apply this action on “Machine to Machine” flow, it will then run each time a client_credentials request is made. After a request with is made you can see the updated application name in the Auth0 dashboard.

Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    Powering the API world

    Increase developer productivity, security, and performance at scale with the unified platform for API management, service mesh, and ingress controller.

    • Products
      • Kong Konnect
      • Kong Gateway Enterprise
      • Kong Gateway
      • Kong Mesh
      • Kong Ingress Controller
      • Kong Insomnia
      • Product Updates
      • Get Started
    • Documentation
      • Kong Konnect Docs
      • Kong Gateway Docs
      • Kong Mesh Docs
      • Kong Insomnia Docs
      • Kong Konnect Plugin Hub
    • Open Source
      • Kong Gateway
      • Kuma
      • Insomnia
      • Kong Community
    • Company
      • About Kong
      • Customers
      • Careers
      • Press
      • Events
      • Contact
  • Terms• Privacy• Trust and Compliance
© Kong Inc. 2025