# Dynamic Client Registration and API access

**URL:** <https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374>\
**Category:** Get Help\
**Created:** [February 23, 2021, 9:15pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374 "2021-02-23T21:15:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matiasb](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matiasb/32/27793_2.png) [@matiasb](https://community.auth0.com/u/matiasb)\
**Post date:** [February 23, 2021, 9:15pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374/1 "2021-02-23T21:15:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 24, 2021, 10:00pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374/3 "2021-02-24T22:00:39Z")

</div>

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](https://auth0.com/docs/logs/streams/aws-eventbridge) 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.

---

<div class="post-metadata">

**Author:** ![matiasb](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/matiasb/32/27793_2.png) [@matiasb](https://community.auth0.com/u/matiasb)\
**Post date:** [February 24, 2021, 10:23pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374/4 "2021-02-24T22:23:12Z")

</div>

Thanks for the reply, I will investigate that path.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [February 24, 2021, 10:23pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374/5 "2021-02-24T22:23:31Z")

</div>

Let us know how it goes!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 11, 2021, 10:24pm UTC](https://community.auth0.com/t/dynamic-client-registration-and-api-access/58374/6 "2021-03-11T22:24:08Z")

</div>

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