# ID Token doesn’t contain the sid 【Resource Owner Password Flow】

**URL:** <https://community.auth0.com/t/id-token-doesn-t-contain-the-sid-resource-owner-password-flow/190100>\
**Category:** Get Help\
**Tags:** sessions, access-token\
**Created:** [August 4, 2025, 7:41am UTC](https://community.auth0.com/t/id-token-doesn-t-contain-the-sid-resource-owner-password-flow/190100 "2025-08-04T07:41:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![t.fukao](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/t.fukao/32/61052_2.png) [@t.fukao](https://community.auth0.com/u/t.fukao)\
**Post date:** [August 4, 2025, 7:41am UTC](https://community.auth0.com/t/id-token-doesn-t-contain-the-sid-resource-owner-password-flow/190100/1 "2025-08-04T07:41:38Z")

</div>

In a shell script, I make a call to the `oauth/token` endpoint to retrieve an ID Token.  
[reference](https://auth0.com/docs/get-started/authentication-and-authorization-flow/resource-owner-password-flow/call-your-api-using-resource-owner-password-flow)

```auto
ACCESS_TOKEN=$(curl --silent --request POST \
  --url 'https://${AUTH0_DOMAIN}/oauth/token' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=password \
  --data-urlencode "username=${AUTH0_USER}" \
  --data-urlencode "password=${AUTH0_PASSWORD}" \
  --data-urlencode "audience=${AUTH0_AUDIENCE}" \
  --data-urlencode "scope=openid profile email" \
  --data-urlencode "client_id=${AUTH0_CLIENT_ID}" \
  --data-urlencode "client_secret=${AUTH0_CLIENT_SECRET}" \
  | jq -r .id_token)

```

It works well and I can retrieve an ID Token.  
However, the token doesn’t contain the **sid** claim.

 ![18747b5b57caa89a7c7281193f93f57f](https://global.discourse-cdn.com/auth0/original/3X/2/c/2ca5a6b52874671dcea942ae794817556319a57d.png)

Is this expected behavior or a bug?

---

<div class="post-metadata">

**Author:** ![teodor.andrei](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/teodor.andrei/32/75320_2.png) [@teodor.andrei](https://community.auth0.com/u/teodor.andrei)\
**Post date:** [August 4, 2025, 10:36am UTC](https://community.auth0.com/t/id-token-doesn-t-contain-the-sid-resource-owner-password-flow/190100/3 "2025-08-04T10:36:49Z")

</div>

Hi @t.fukao, and thank you for your question!

The `sid` (Session ID) claim is not included in tokens obtained via the Resource Owner Password Grant (ROPG) because this flow is non-interactive and **does not create a user session** with the Auth0 authentication server.

To get an ID Token that contains a `sid` claim, you must use an interactive, OIDC-conformant login flow like the **Authorization Code Flow** , where a user authenticates through their browser, **not** through a shell script.

I hope this info helps you!  
Teodor.

---

<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 18, 2025, 10:37am UTC](https://community.auth0.com/t/id-token-doesn-t-contain-the-sid-resource-owner-password-flow/190100/4 "2025-08-18T10:37:15Z")

</div>

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