# Adding Custom Claims After Login with Custom Triggers

**URL:** <https://community.auth0.com/t/adding-custom-claims-after-login-with-custom-triggers/136400>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [June 14, 2024, 7:11pm UTC](https://community.auth0.com/t/adding-custom-claims-after-login-with-custom-triggers/136400 "2024-06-14T19:11:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark29](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mark29/32/48577_2.png) [@mark29](https://community.auth0.com/u/mark29)\
**Post date:** [June 14, 2024, 7:11pm UTC](https://community.auth0.com/t/adding-custom-claims-after-login-with-custom-triggers/136400/1 "2024-06-14T19:11:07Z")

</div>

Hello,

I’m working on an integration with Auth0 and have a requirement to add a custom claim to a user’s JWT when they hit a certain condition in the flow of our app. This custom claim will contain metadata that is then used by our app for authorization purposes. Is it possible to call a Flow script from a custom trigger, possibly by using the client SDK? The custom claim metadata will not be known during the user login event, so the Flow script for the Login trigger won’t work.

Thanks

---

<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:** [June 14, 2024, 8:09pm UTC](https://community.auth0.com/t/adding-custom-claims-after-login-with-custom-triggers/136400/3 "2024-06-14T20:09:39Z")

</div>

Hi @mark29,

Yes, this is possible. This can be done with a post login action to [add custom claims to the access token](https://community.auth0.com/t/adding-custom-claims-to-tokens/84590).

It’s worth mentioning that the access token is issued immediately after a user logs in. So, if you are unsure of the custom claim metadata during the login event, you might want to consider saving that information in the user’s user\_metadata once you know.

Then, when the user logs in next or if you [silently authenticate](https://auth0.com/docs/authenticate/login/configure-silent-authentication) them, it will appear in the access token as custom claims.

I also suggest checking out our [Explore Flows and Triggers](https://auth0.com/docs/customize/actions/flows-and-triggers) documentation.

Let me know if you have any 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:** [June 28, 2024, 8:09pm UTC](https://community.auth0.com/t/adding-custom-claims-after-login-with-custom-triggers/136400/4 "2024-06-28T20:09:49Z")

</div>

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