any possible way to access GlideSessions.lockOutSessionsInAllNodes from scoped application

JaineelPetiwale
Tera Contributor

Hey, I'm working on a custom scoped application, in which im using GlideSessions.lockOutSessionsInAllNodes for some purpose. But getting, 

GlideSessions is not allowed in scoped applications

Is there any possible way to use GlideSessions.lockOutSessionsInAllNodes in scoped application ?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@JaineelPetiwale 

what's your business requirement here?

There are lot of script include which don't work in scoped app

Workaround is

1) create global scope script include, accessible from all scopes

2) then call this global scope script include from your scoped app

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Kieran Anson
Kilo Patron

Could you explain why you need access via a scoped application? 

 

It's common to create a global script include that your scoped application can access for APIs not available in a scoped application. But messing with GlideSession sounds like a bad idea....

🤔🤔

Actually, Ya I wanted to utilize GlideSession to forcefully logout the user, and it worked by created script include, so now this query is clear.

JaineelPetiwale_0-1744005089396.png

 

 

Glad that worked, curious to why my answer was overlooked, being the first response and the same answer