AuthApiError: Grant type 'client_credentials' not allowed for the client

Hey everyone, so basically i’m trying to create an action that i’ll put in the login flow, the action will set a role for the user after it’s first login. Here’s my code snippet for the action:

I’ve already set my secret values and the auth0 dependency.
When trying to test my code i get this error:

Now after reading the documentation, i think i should just enable the client_credentials in the advanced settings of my app, but when trying to i get this warning:

When trying to change the Token Endpoint Auth Method, i wasn’t able to find it in the dashboard. Btw i’m using a SPA .

I hope this topic finds you well, waiting for your replies and thanks.

Hey there @lakoud133 welcome to the community!

You’ll want to create and utilize a M2M application for purposes of instantiating the ManagementClient in your Action code:

1 Like

Thanks for solution. it also help me.

1 Like