# OIDC pass custom claim from id\_token

**URL:** <https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870>\
**Category:** Get Help\
**Tags:** oidc-enterprise-connection, connections\
**Created:** [April 17, 2023, 2:00pm UTC](https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870 "2023-04-17T14:00:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroen.broekhuizen](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jeroen.broekhuizen](https://community.auth0.com/u/jeroen.broekhuizen)\
**Post date:** [April 17, 2023, 2:00pm UTC](https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870/1 "2023-04-17T14:00:55Z")

</div>

I am using an OIDC connection to authenticate with another party. They are passing a claim on the id\_token, that I would like to pass along onto the access\_token, so we can read it from the backend.

I know I can add custom claims with the rules, but can I read the id\_token of the provider in that as well?

---

<div class="post-metadata">

**Author:** ![jeroen.broekhuizen](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jeroen.broekhuizen](https://community.auth0.com/u/jeroen.broekhuizen)\
**Post date:** [April 19, 2023, 2:48pm UTC](https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870/3 "2023-04-19T14:48:20Z")

</div>

I figured out a way to do it. Instead of registering the connection as an OIDC connection, I used a social connection, which allows a custom userprofile script. This allowed me to read the claim from the token and add it to the userprofile.

---

<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:** [April 19, 2023, 11:04pm UTC](https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870/4 "2023-04-19T23:04:49Z")

</div>

Hey @jeroen.broekhuizen welcome to the community!

That’s great, I’m glad you were able to get this sorted and thanks a bunch for sharing your solution with the community 😄

---

<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:** [May 3, 2023, 11:05pm UTC](https://community.auth0.com/t/oidc-pass-custom-claim-from-id-token/104870/5 "2023-05-03T23:05:36Z")

</div>

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