Action on role changes

Is it possible to attach an action for when the role changes?
The use case is:
I would like to store roles for our users. The role would define how a user can interact with 2 client applications but it would be great if:

  1. An admin can go and change a user’s role from the User Management tab
  2. The first step triggers an HTTP request using Actions to the client applications so that the role can be propagated to the client apps.

If any action or webhooks is not available for that, can you please suggest me any workaround to achieve that?

Hi @auth029,

Welcome to the Auth0 Community!

Unfortunately, there isn’t an Action flow that can be triggered after a user’s role has been updated. For now, the only flows available in Actions are listed here.

As a workaround I recommend using the Management API Update a user endpoint to update the user’s Roles. And then writing a script to make the HTTP request to propagate the role to the client apps.

I hope this helps!

Thanks,
Rueben

Hi @rueben.tiow,

Thank you for your response. I have found another workaround to implement the webhooks for the different actions on auth0 like role changes, success/failed login etc.

To create the webhook, use the following steps:

  1. Log into Auth0.
  2. Choose Monitoring>Streams, and then Create Log Stream.
  3. Choose Custom Webhook.
  4. Create a name for the Webhook such as Observe Webhook.
  5. Choose Create.
  6. Enter https://{OBSERVE_CUSTOMER}.collect.observeinc.com/v1/http/auth0 as the Payload URL.
  7. For the Authorization token, enter Bearer {CustomerId} {IngestToken}.
  8. Choose Application/json as the Content Type.
  9. For the Content Filter Category, select All.
  10. Choose Save.

This will send the logs to your registered Payload URL. In the payload URL, you can perform your desired actions by looking into the logs. I hope this will help the other developers.

1 Like

Hi @auth029,

Thanks for your reply and sharing your solution with the rest of the Community!

Please reach out to us again if you have any additional questions.

Thanks,
Rueben

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