# Action on role changes

**URL:** <https://community.auth0.com/t/action-on-role-changes/119975>\
**Category:** Get Help\
**Tags:** application, addons\
**Created:** [November 1, 2023, 3:19pm UTC](https://community.auth0.com/t/action-on-role-changes/119975 "2023-11-01T15:19:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![auth029](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@auth029](https://community.auth0.com/u/auth029)\
**Post date:** [November 1, 2023, 3:19pm UTC](https://community.auth0.com/t/action-on-role-changes/119975/1 "2023-11-01T15:19:31Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 2, 2023, 6:13pm UTC](https://community.auth0.com/t/action-on-role-changes/119975/3 "2023-11-02T18:13:59Z")

</div>

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](https://auth0.com/docs/customize/actions/flows-and-triggers).

As a workaround I recommend using the Management API [Update a user endpoint](https://auth0.com/docs/api/management/v2/users/patch-users-by-id) 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

---

<div class="post-metadata">

**Author:** ![auth029](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@auth029](https://community.auth0.com/u/auth029)\
**Post date:** [November 3, 2023, 8:07am UTC](https://community.auth0.com/t/action-on-role-changes/119975/4 "2023-11-03T08:07:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [November 13, 2023, 4:58pm UTC](https://community.auth0.com/t/action-on-role-changes/119975/5 "2023-11-13T16:58:57Z")

</div>

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

---

<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:** [November 27, 2023, 4:59pm UTC](https://community.auth0.com/t/action-on-role-changes/119975/6 "2023-11-27T16:59:51Z")

</div>

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