# 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:** 1\
**Showing post:** 2

<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…

---

_[View the full topic](https://forum.inductiveautomation.com/t/perspective-auto-logout-using-gateway-event-scheduled/106245)._
