# Perspective Auto Logout using Gateway Event Scheduled

**URL:** <https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 14, 2025, 10:47am UTC](https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245 "2025-05-14T10:47:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xubin](https://avatars.discourse-cdn.com/v4/letter/x/bcef8e/32.png) [@xubin](https://forum.inductiveautomation.com/u/xubin)\
**Post date:** [May 14, 2025, 10:47am UTC](https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245/1 "2025-05-14T10:47:38Z")

</div>

I would like to create the function to logout the all client current users at specify time using Gateway Event Scheduled. I refer to this post [Session prop change script has no system.security.logout()?](https://forum.inductiveautomation.com/t/session-prop-change-script-has-no-system-security-logout/67818) to try it. However, I am not sure how to get the sessionId. Any suggestion for this? I am using Ignition 8.1.44.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 14, 2025, 11:28am UTC](https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245/2 "2025-05-14T11:28:41Z")

</div>

You should be able to use [`system.perspective.getSessionInfo()`](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-getSessionInfo) to get the page ids for all open sessions.

I think the answer you're after is literally in that linked topic

> [@Session prop change script has no system.security.logout()?](https://forum.inductiveautomation.com/t/session-prop-change-script-has-no-system-security-logout/67818/6):
>
> Seems like a pageId is required for the logout function... You can get pageIds from [system.perspective.getSessionInfo()](https://docs.inductiveautomation.com/display/DOC81/system.perspective.getSessionInfo). You might be able to get what you want if you iterate over those and log the user out for each page. Perhaps something similar to this? sessionId = self.props.id pageIds = [] #Get page IDs for session in system.perspective.getSessionInfo(): if session['id'] == sessionId: pageIds = session['pageIds'] break #Logout each page for pageId in pageIds: system.perspective.lo…

---

<div class="post-metadata">

**Author:** ![xubin](https://avatars.discourse-cdn.com/v4/letter/x/bcef8e/32.png) [@xubin](https://forum.inductiveautomation.com/u/xubin)\
**Post date:** [May 16, 2025, 2:52am UTC](https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245/3 "2025-05-16T02:52:48Z")

</div>

Thank you for reply, I figured out how to trigger from gateway event scheduled. Here is my result.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/2/52c6ed231e8a39b5fa7212865a7c1f73cbcb9741.png)
