Dynamic Client Registration and API access

Hi, I’ve been trying the Dynamic Client Registration flow, trying to achieve the following scenario:

  1. An application is registered using the Auth0 DCR endpoint. By default this supports the “client_credentials” grant. (Works fine)
  2. The application type is changed to M2M. (It’s done manually, is it possible to automate it?)
  3. An API is created and the previously created application is authorized using the “Machine to Machine Applications” tab in the API settings.
  4. Finally I’m able to generate a token, etc.

I’m trying to understand if it’s possible to achieve the following by setting some kind of default behavior:

  1. When an application is registered through DCR, its type gets automatically changed to M2M.
  2. Set a “default API” so that new applications automatically gain access to it.

I have looked at the docs but didn’t find a way of setting up this scenario, the main idea is to extend the default application settings that apply to DCR-created clients. I’m guessing that if there’s no way of achieving this out of the box, I might need to implement hooks or additional calls to the management API. I’m trying to keep my implementation as simple and standard as possible so that the same code works for multiple IDPs.

1 Like

Hi @matiasb,

I can’t find a way to do this with settings in the dashboard.

You should be able to set up a log stream with AWS Event Bridge to monitor your log events, and when you see a log "type": "sapi", "description": "Dynamic client registration", trigger a lambda to update the client via the Auth0 Management API.

1 Like

Thanks for the reply, I will investigate that path.

1 Like

Let us know how it goes!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.