# How can I get client\_id in my jwt claims instead of just azp?

**URL:** <https://community.auth0.com/t/how-can-i-get-client-id-in-my-jwt-claims-instead-of-just-azp/196061>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [January 8, 2026, 1:05pm UTC](https://community.auth0.com/t/how-can-i-get-client-id-in-my-jwt-claims-instead-of-just-azp/196061 "2026-01-08T13:05:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shafkevi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shafkevi/32/72644_2.png) [@shafkevi](https://community.auth0.com/u/shafkevi)\
**Post date:** [January 8, 2026, 1:05pm UTC](https://community.auth0.com/t/how-can-i-get-client-id-in-my-jwt-claims-instead-of-just-azp/196061/1 "2026-01-08T13:05:56Z")

</div>

I am trying to create an API application that allows me to send JWTs to an Amazon Bedrock AgentCore Runtime services, which can decode JWTs via a clientID parameter, but it requires the JWT claims to have client\_id explicitly. Since the JWT created by Auth0 only supplies azp, I cannot get this to work. I tried trigger actions, but learned that client\_id is a reserved key and cannot be updated.

How can I resolve this issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [January 8, 2026, 5:46pm UTC](https://community.auth0.com/t/how-can-i-get-client-id-in-my-jwt-claims-instead-of-just-azp/196061/3 "2026-01-08T17:46:04Z")

</div>

Hi @shafkevi,

Welcome to the Auth0 Community!

You are asking how to make Auth0 access tokens for your API include an explicit `client_id` claim, because Amazon Bedrock AgentCore Runtime requires that claim and Auth0 tokens currently include only `azp`.

Switching the API’s Access Token Profile to RFC 9068 causes Auth0 to issue access tokens with `client_id` in place of `azp`. Custom Actions cannot set `client_id` because it is a reserved claim, so the profile change is the supported way to get this claim.

## [Solution]

## 🛠 Option 1: Switching to the IETF RFC 9068 Token Profile (Recommended)

The cleanest and most robust method is to switch your API’s Access Token Profile to the IETF JWT Profile (RFC 9068) [911061]. When this profile is active, Auth0 automatically emits the standard **`client_id`** claim in the JWT payload instead of the legacy `azp` (Authorized Party) claim.

### How to configure it:

1. Navigate to the **Auth0 Dashboard \> Applications \> APIs**.

2. Select your registered API (Resource Server) [911061].

3. Under the **Settings** tab, scroll down to **Access Token Settings**.

4. Find the **Access Token Profile** dropdown and change it from `Auth0` to **`RFC 9068`**.

5. Click **Save** [911061].

* * *

## ⚙ Option 2: Appending a Custom Claim via Post-Login Actions (With Caveats)

You are entirely correct: **`client_id` is a reserved OIDC/OAuth2 claim**.  
Auth0 strictly forbids adding, overwriting, or modifying core reserved claims (like `client_id`, `sub`, `aud`, `iss`, or `scope`) directly under their un-namespaced keys using custom claims . Attempting to do so will result in runtime errors or the claims being silently ignored.

However, you can successfully use an **Auth0 Post-Login Action** if you append the client ID under a **custom namespace**. This is a valid alternative if your downstream consumer (such as Amazon Bedrock AgentCore Runtime) can be configured to read a custom claim path.

### Implementation:

Create and deploy a Post-Login Action using the following format:

```auto
exports.onExecutePostLogin = async (event, api) => {
  // Replace with your custom domain or platform namespace
  const namespace = 'https://api.yourdomain.com/claims'; 
  
  // Sourcing the client ID dynamically from the event context
  const clientID = event.client.client_id; 

  // Setting the claim securely under your custom namespace
  api.accessToken.setCustomClaim(`${namespace}/client_id`, clientID);
};

```

I hope this helps and if you have further questions please let me know.  
Thank you!  
Best regards,  
Remus

---

<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:** [January 22, 2026, 5:46pm UTC](https://community.auth0.com/t/how-can-i-get-client-id-in-my-jwt-claims-instead-of-just-azp/196061/4 "2026-01-22T17:46:10Z")

</div>

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