Guide · 18 properties

ServiceNow session timeout properties: glide.ui.session_timeout vs glide.ui.active.session.life_span

ServiceNow has two kinds of session limits. An inactivity timeout ends a session after a period without requests. A maximum lifespan ends it after a fixed time, no matter how active the user is. Both exist separately for UI users, guests and integrations. This guide compares the properties, explains why users often stay logged in longer than expected, and shows how to test a change.

Test session changes on a sub-production instance first. A short lifespan logs out everyone in the middle of their work, including admins. A short integration timeout can break long running integration jobs.

Defaults on this page are the values from the out of the box property record or the ServiceNow documentation. Your instance may have different values, so run the check script below before you plan changes.

Spotted a mistake, or know a setting that belongs here? Send me a message and I will update the page.

Inactivity timeout vs maximum lifespan

glide.ui.session_timeout is the inactivity timeout for logged in users, in minutes. The clock restarts with every request the browser sends. The documentation lists 30 minutes as the default. Values above 1440 are treated as one day, and glide.ui.max_session_timeout caps the effective value.

glide.ui.active.session.life_span is the maximum lifespan, in minutes, regardless of activity. The default 0 means no limit. With a value of 600, a user is logged out 10 hours after login even while working. ServiceNow says the lifespan should be larger than the inactivity timeout.

Example: with glide.ui.session_timeout = 60 and glide.ui.active.session.life_span = 660, a user who walks away is logged out after 60 idle minutes, and a user who works all day has to log in again after 11 hours.

glide.ui.session_timeleft and glide.ui.active.session_timeleft set how many minutes before the end users see the warning, with the option to extend. 0 turns the warning off.

  1. Pick the idle timeout your security policy asks for and set glide.ui.session_timeout.
  2. If the policy also asks for a daily re-login, set glide.ui.active.session.life_span to a value larger than the idle timeout, for example 600 to 720 minutes.
  3. Keep the warning (glide.ui.session_timeleft) at 2 minutes or more so users can save their work.
  4. Leave glide.ui.auto_req.extend.session on false so auto refreshing homepages do not keep sessions alive forever.
PropertyDefaultTypical settingWhat it does
glide.ui.session_timeout 90 30 to 60 (minutes idle) Sets the initial user session timeout in minutes. The default is 90 minutes, and values above 1440 minutes are treated as one day.
glide.ui.active.session.life_span 0 e.g. 600 to 720, larger than the idle timeout Limits the maximum lifespan of authenticated UI HTTP sessions, regardless of user activity. The default value of 0 disables this limit; a positive value logs users out after that many minutes and requires them to sign in again.
glide.ui.session_timeleft 2 2 Sets how many minutes before inactivity timeout users are prompted to extend their session. The default is 2 minutes; setting the value to 0 disables the prompt.
glide.ui.active.session_timeleft 2 2 Sets how many minutes before session timeout users are warned that their active session is ending. The default is 2 minutes; setting the value to 0 disables the warning prompt, while other values determine how early it appears.
glide.ui.max_session_timeout Not stated Leave as delivered Caps the effective UI session timeout set by glide.ui.session_timeout at 1,440 minutes. Raising or lowering this limit changes the longest interactive session window allowed, even when glide.ui.session_timeout is set higher.
glide.ui.auto_req.extend.session Not stated false Enables homepage-refresh intervals to extend a user's session. When false, sessions expire after the configured timeout, plus one refresh interval when set; tablet and mobile devices do not support this property.

Guest, integration and other session types

Guests (not logged in users of a portal or chat) and integrations have their own pair of properties. Changing glide.ui.session_timeout does not change them.

Integration sessions time out after only a short idle period by default (glide.integration.session_timeout, 1 minute in the property reference). glide.integrations.active.session.life_span adds a maximum lifespan for them, which should again be larger than the idle timeout.

When a lifespan is set, glide.active.session.timeout.invalidate.session = true makes the platform end the session right away instead of leaving a short gap until the application server removes it. Security hardening recommends it. glide.active.session.timeout.exception.roles lists technical roles that are exempt from the lifespan.

  1. Set glide.guest.active.session.life_span if your portal or chat serves anonymous users, so their sessions cannot stay open indefinitely.
  2. Set glide.integrations.active.session.life_span larger than the longest integration run you have.
  3. Set glide.active.session.timeout.invalidate.session to true once a lifespan is in place.
  4. Test an integration by sending requests with the integration user over a period longer than the lifespan, and check that it re-authenticates cleanly.
PropertyDefaultTypical settingWhat it does
glide.guest.session_timeout 30 30 Sets the inactive session timeout for unauthenticated guest users, in minutes. The documented default is 30 minutes; setting it to 0 uses the general UI session timeout, while values above 30 can increase persisted sessions.
glide.guest.active.session.life_span 0 e.g. 60 to 240 Sets the maximum lifetime, in minutes, for active guest HTTP sessions, regardless of activity. The default value of 0 disables this limit, so sessions instead remain subject to the guest inactive timeout.
glide.unauthorized.session_timeout 5 5 Sets the HTTP session timeout, in minutes, for unauthenticated guest sessions. The default is 5 minutes, and the value must be lower than the standard session timeout.
glide.integration.session_timeout Not stated Leave as delivered Sets the idle timeout for integration sessions in minutes. With the default value of 1, an integration session ends and logs the user out after one minute of inactivity.
glide.integrations.active.session.life_span 0 Longer than your longest integration run Sets the maximum lifetime, in minutes, for active integration HTTP sessions, regardless of activity. The default value of 0 disables the lifetime limit, so sessions end through the inactive timeout instead.
glide.active.session.timeout.invalidate.session Not stated true Enables proactive invalidation of timed-out sessions before the Tomcat container processes them. With the default false setting, a brief interval remains before invalidation; set it to true alongside a session lifespan setting to close that gap.
glide.active.session.timeout.exception.roles Not stated Leave as delivered Exempts a comma-separated list of roles from active session timeout limits. Roles in the default list—edge_encryption, mid_server, and maint—can keep sessions active without the timeout requiring re-authentication.
glide.sso.acr.ui.session.timeout 30 30 Sets the inactivity timeout for account recovery user sessions in minutes. At the default of 30 minutes, an inactive session is terminated after half an hour; increasing or decreasing the value changes how long it remains active.

Why users are not logged out, and how to test

The most common surprise: the timeout is set to a few minutes, but users are never logged out. Usually the session did end, and the Remember me cookie logged the user in again without a prompt. The cookie stays valid for remember_me_cookie.duration_in_days (15 days by default, capped by remember_me.max_duration_in_days).

Other reasons are a second open tab of the same instance, which keeps the shared session active, and SSO: after the session ends, the identity provider signs the user in again as long as its own session is still valid.

For a hard re-login, combine a lifespan with a shorter Remember me period, and clear the default of glide.ui.remember.me.default so the box is not ticked on the login page.

  1. On sub-production, set glide.ui.session_timeout to 5 and glide.ui.session_timeleft to 2.
  2. Open a private browser window, log in with a local test user and leave Remember me unticked. Close all other tabs of the instance.
  3. Wait without clicking. The warning should appear after about 3 minutes and the session should end after 5.
  4. Repeat with Remember me ticked to see the silent re-login, then set the properties back.
PropertyDefaultTypical settingWhat it does
remember_me_cookie.duration_in_days 15 e.g. 1 to 15 Sets the default expiration period, in days, for the remember-me cookie. The default is 15 days, and each qualifying login resets the expiration period, up to the 30-day maximum.
remember_me.max_duration_in_days 30 30 or lower Caps how many days the remember-me cookie can remain valid before requiring users to reauthenticate. The default cap is 30 days, with a documented maximum of 365 days.
glide.authenticate.max.concurrent.interactive.sessions 1 Only with concurrent session limiting Sets the maximum number of concurrent interactive sessions a user can have when session limiting is enabled. The default value of 1 allows one active interactive session per user, and this limit applies only when concurrent session limiting is turned on.
glide.zta.high_assurance.session.timeout 30 30 Sets how long a high assurance session remains valid before users must re-authenticate. The default is 30 minutes; shorter intervals prompt users to verify their identity more often, and values can range from 1 to 480 minutes.

Check your instance

Paste this read-only background script into System Definition > Scripts - Background on a sub-production instance. It prints the current value of every property in this guide. A property without a record runs on its platform default. You can also open sys_properties.list and filter by name.

// Read only: prints the current value of every property in this guide.
// Run in System Definition > Scripts - Background.
var names = [
  'glide.ui.session_timeout',
  'glide.ui.active.session.life_span',
  'glide.ui.session_timeleft',
  'glide.ui.active.session_timeleft',
  'glide.ui.max_session_timeout',
  'glide.ui.auto_req.extend.session',
  'glide.guest.session_timeout',
  'glide.guest.active.session.life_span',
  'glide.unauthorized.session_timeout',
  'glide.integration.session_timeout',
  'glide.integrations.active.session.life_span',
  'glide.active.session.timeout.invalidate.session',
  'glide.active.session.timeout.exception.roles',
  'glide.sso.acr.ui.session.timeout',
  'remember_me_cookie.duration_in_days',
  'remember_me.max_duration_in_days',
  'glide.authenticate.max.concurrent.interactive.sessions',
  'glide.zta.high_assurance.session.timeout'
];
var found = {};
var gr = new GlideRecord('sys_properties');
gr.addQuery('name', 'IN', names.join(','));
gr.query();
while (gr.next()) {
  found[gr.getValue('name')] = gr.getValue('value');
}
for (var i = 0; i < names.length; i++) {
  var n = names[i];
  gs.print(n + ' = ' + (found.hasOwnProperty(n) ? found[n] : '(no record on this instance, platform default applies)'));
}

FAQ

What is the difference between glide.ui.session_timeout and glide.ui.active.session.life_span?

glide.ui.session_timeout ends a session after a period without activity. glide.ui.active.session.life_span ends it after a fixed time since login, even if the user is active. The lifespan should be larger than the inactivity timeout. 0 turns the lifespan off.

What is the default session timeout in ServiceNow?

The documentation lists 30 minutes for glide.ui.session_timeout. Values above 1440 minutes are treated as one day. Guest sessions use glide.guest.session_timeout and integration sessions glide.integration.session_timeout.

Does the session timeout apply to active users?

No. glide.ui.session_timeout only counts idle time, so an active user stays logged in. To log out active users after a fixed time, set glide.ui.active.session.life_span.

I set the session timeout to 1 minute but users are not logged out. Why?

Usually the Remember me cookie or SSO logs them in again silently after the session ends, or another open tab keeps the session active. Test in a private window with Remember me unticked and no other tabs open.

What value should glide.ui.active.session.life_span have?

It depends on your policy, but it must be larger than glide.ui.session_timeout. Common values are 600 to 720 minutes, which forces one login per working day.

How do I set a session timeout for integrations?

Use glide.integration.session_timeout for the idle timeout and glide.integrations.active.session.life_span for the maximum lifespan. glide.ui.session_timeout does not apply to integration sessions.

Can I exempt admins from the session timeout?

Not through these properties. glide.active.session.timeout.exception.roles only exempts listed technical roles from the active lifespan, and is meant for system roles such as mid_server, not for people.

Something wrong or missing on this page? Tell me and I will fix it.

Send feedback