# Token Hook when refreshing tokens

**URL:** <https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026>\
**Category:** OAuth/OIDC\
**Tags:** hooks\
**Created:** [April 30, 2025, 9:02pm UTC](https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026 "2025-04-30T21:02:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wherold](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wherold](https://devforum.okta.com/u/wherold)\
**Post date:** [April 30, 2025, 9:02pm UTC](https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026/1 "2025-04-30T21:02:54Z")

</div>

We use the token hook to add calculated claims to access tokens. If the claims change we would like to update the token the next time it is refreshed, but the hook does not seem to be called when a refresh token is used. Is this expected? Is there any way to have the hook called on refresh?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [April 30, 2025, 9:10pm UTC](https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026/2 "2025-04-30T21:10:25Z")

</div>

A Token Inline Hook can definitely be called during a token refresh.

Are you not seeing system logs showing that there was a hook execution when using the refresh token to get new tokens?

What does the Access Rule on which the hook has been enabled look like? Are you sure that the right Access Policy and Rule are getting triggered in that request?

---

<div class="post-metadata">

**Author:** ![wherold](https://avatars.discourse-cdn.com/v4/letter/w/e274bd/32.png) [@wherold](https://devforum.okta.com/u/wherold)\
**Post date:** [April 30, 2025, 9:13pm UTC](https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026/3 "2025-04-30T21:13:21Z")

</div>

Thank you for responding, given this information it sounds like something we can debug on our end, will look into it further

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [May 30, 2025, 9:14pm UTC](https://devforum.okta.com/t/token-hook-when-refreshing-tokens/33026/4 "2025-05-30T21:14:11Z")

</div>

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