# Not able to get idToken

**URL:** <https://community.auth0.com/t/not-able-to-get-idtoken/115525>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [September 6, 2023, 10:30am UTC](https://community.auth0.com/t/not-able-to-get-idtoken/115525 "2023-09-06T10:30:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohansivaram](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mohansivaram](https://community.auth0.com/u/mohansivaram)\
**Post date:** [September 6, 2023, 10:30am UTC](https://community.auth0.com/t/not-able-to-get-idtoken/115525/1 "2023-09-06T10:30:41Z")

</div>

We are using swift Auth0 SDK in iOS application to enable users login.

WebAuth login is working fine by returning the user profile saved in user\_metadata as custom claims in IDToken.

When we update the profile saved in user\_metadata, I’m not able to get the updated idToken by calling `Auth0.authentication().renew(withRefreshToken:..)` or by calling `Auth0.authentication().userInfo(`)`. IDToken / customclaims is not returned,

Here is the scope that I’m using. “openid profile email read:current\_user update:current\_user\_metadata offline\_access”.

Please support me on #2 mentioned above.

---

<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:** [September 6, 2023, 11:29pm UTC](https://community.auth0.com/t/not-able-to-get-idtoken/115525/3 "2023-09-06T23:29:18Z")

</div>

Hey there @mohansivaram welcome to the community 🙂

I believe you aren’t receiving the updated ID token because it is still valid at the time of renewal - What happens if you pass an extra parameter of `"cacheMode": "off"` as outline [here](https://github.com/auth0/Auth0.swift/blob/210ebdafa186f21fe911a7d2c9f83ccbaa194c0b/V2_MIGRATION_GUIDE.md?plain=1#L518)?

```auto
Auth0
    .authentication()
    .renew(withRefreshToken: credentials.refreshToken) // Returns a Request
    .parameters(["cacheMode": "off"]) 
    .start { result in
        // ...
    }

```

---

<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:** [September 20, 2023, 11:29pm UTC](https://community.auth0.com/t/not-able-to-get-idtoken/115525/4 "2023-09-20T23:29:19Z")

</div>

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