# Modifying ID token

**URL:** <https://community.auth0.com/t/modifying-id-token/141143>\
**Category:** Get Help\
**Tags:** oidc, protocols\
**Created:** [August 15, 2024, 7:51pm UTC](https://community.auth0.com/t/modifying-id-token/141143 "2024-08-15T19:51:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardb](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@richardb](https://community.auth0.com/u/richardb)\
**Post date:** [August 15, 2024, 7:51pm UTC](https://community.auth0.com/t/modifying-id-token/141143/1 "2024-08-15T19:51:21Z")

</div>

Hello,

I modify some user information using the management API, but then I also want my ID token to be updated. Can I directly modify my current ID token, or do I need to request a new one from auth0?

Thank you and have a great day!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [August 15, 2024, 8:15pm UTC](https://community.auth0.com/t/modifying-id-token/141143/3 "2024-08-15T20:15:58Z")

</div>

Hey @richardb!

> [@richardb](#):
>
> Can I directly modify my current ID token, or do I need to request a new one from auth0?

There’s no way to update an ID token, you’ll need to request a new one in order for the updated information to be reflected. You could however call the [userinfo](https://auth0.com/docs/api/authentication#get-user-info) endpoint instead to get the updated user profile.

---

<div class="post-metadata">

**Author:** ![richardb](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@richardb](https://community.auth0.com/u/richardb)\
**Post date:** [August 15, 2024, 8:24pm UTC](https://community.auth0.com/t/modifying-id-token/141143/4 "2024-08-15T20:24:24Z")

</div>

How can I get a new one without reauthenticating the user?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [August 15, 2024, 8:29pm UTC](https://community.auth0.com/t/modifying-id-token/141143/5 "2024-08-15T20:29:06Z")

</div>

You will need to re-auth the user one way or another - It depends on the technology you are working with, but silent auth is an option for SPA SDKs for example:

> [@Re fetching idtoken](https://community.auth0.com/t/re-fetching-idtoken/114982/3):
>
> Hey @auth0rocks ! metal This should be possible by calling [getAccessTokenSilently](https://auth0.github.io/auth0-react/interfaces/Auth0ContextInterface.html#getAccessTokenSilently) and passing the [cacheMode param](https://auth0.github.io/auth0-react/interfaces/GetTokenSilentlyOptions.html#cacheMode) {cacheMode: "off"}. This basically just forces the refreshing of tokens - Unfortunately I am not aware of any way to only get a new ID token, so this will also return a new access token. Hope this helps!

---

<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:** [August 29, 2024, 8:30pm UTC](https://community.auth0.com/t/modifying-id-token/141143/6 "2024-08-29T20:30:08Z")

</div>

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