# Are session\_ids unique to the session or channel?

**URL:** <https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [October 20, 2020, 5:49pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851 "2020-10-20T17:49:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jason10/32/12805_2.png) [@jason10](https://community.auth0.com/u/jason10)\
**Post date:** [October 20, 2020, 5:49pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/1 "2020-10-20T17:49:45Z")

</div>

I have set up a Rule to ping my azure function app with session\_id  
I also have a log stream that pings my azure functions app with session\_id

On the same log in event, two different session\_id 's get sent, is this supposed to be the case?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 21, 2020, 7:48pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/3 "2020-10-21T19:48:21Z")

</div>

I am getting the same session id for login and logout. Can you DM me your tenant name so I can look at your logs?

---

<div class="post-metadata">

**Author:** ![jason10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jason10/32/12805_2.png) [@jason10](https://community.auth0.com/u/jason10)\
**Post date:** [October 21, 2020, 9:16pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/4 "2020-10-21T21:16:06Z")

</div>

Just sent a DM - the issue isn’t login and logout session\_id

It is that I get session\_id from log streams and it is one value.

Then I also get session\_id from rules - context.sessionID and it is a separate value.

The one from the log streams and the one from context.sessionID are different even though they are the same session/login event

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 23, 2020, 3:25pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/5 "2020-10-23T15:25:18Z")

</div>

How are you getting the session ID in the log stream? Through the AWS event bridge integration and to a Lambda?

---

<div class="post-metadata">

**Author:** ![jason10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jason10/32/12805_2.png) [@jason10](https://community.auth0.com/u/jason10)\
**Post date:** [October 24, 2020, 3:57pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/6 "2020-10-24T15:57:59Z")

</div>

Log stream to custom webhook where `session_id` is in `data.details.session_id`

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 26, 2020, 11:26pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/7 "2020-10-26T23:26:44Z")

</div>

It looks like this may be related to this in the doc:

> `context.sessionID`: An internal identification for the authentication session. Value is kept only if `prompt=none` is used in the authorization request. Note that the session ID can change **after** rule execution on other flows, so the value available in `context.sessionID` might not match the new session ID that the user will receive. This makes this value only meaningful when `prompt=none` is used.

---

<div class="post-metadata">

**Author:** ![jason10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jason10/32/12805_2.png) [@jason10](https://community.auth0.com/u/jason10)\
**Post date:** [October 26, 2020, 11:33pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/8 "2020-10-26T23:33:14Z")

</div>

Hmm, where would prompt=none be implemented in the flow? I use $auth0-\>login() in PHP regular web app to authenticate.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 26, 2020, 11:38pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/9 "2020-10-26T23:38:48Z")

</div>

You won’t use it. Silent authentication is for SPAs.

You might not be able to accomplish what you are looking for with session IDs.

---

<div class="post-metadata">

**Author:** ![jason10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jason10/32/12805_2.png) [@jason10](https://community.auth0.com/u/jason10)\
**Post date:** [October 26, 2020, 11:47pm UTC](https://community.auth0.com/t/are-session-ids-unique-to-the-session-or-channel/51851/10 "2020-10-26T23:47:10Z")

</div>

I am also unsure that the above quote is the case.

Given I am log streaming, I recover the log in event with a certain session ID. Then I can also track the activity of the individual within context session ID.

And then I can track the signout event through log streams. The session ID is consistent through the log streams but not in the middle with the context session ID.

My goal is to track user activity, from log in to log out. Log streams allows me to track both those events, and I use context sessionID to track the in between on platform activity.

Would there be a way to achieve this given the differing session IDs?
