Adaptive authentication in ServiceNow evaluates each login and API request against policy conditions, then allows or denies access. Those conditions use filter criteria such as IP range, user role, user group and country. Trusted devices let a registered phone reach the instance from outside the trusted network.
How the framework decides access
Adaptive authentication runs on a few parts. Authentication policies hold the decision logic. Each policy has policy inputs, which are filter criteria that supply facts about a request, and policy conditions, which test those facts. Policy contexts decide when a policy runs during login. The instance security and access control guide covers the wider set of controls. For the login options themselves, see login options compared.
A policy’s default stance changes how its conditions read. An Allow Access Policy denies requests by default and lets through the requests that match its conditions. A Deny Access Policy allows requests by default and blocks the ones that match. Policy conditions can combine with AND and OR, so check the combined effect of all conditions before you save.
| Built-in policy | What it does |
|---|---|
| Allow access policy | Denies by default and allows requests that match its conditions |
| Deny access policy | Allows by default and denies requests that match its conditions |
| Global blocking policy | Denies users and APIs before authentication, as an alternative to IP Address Access Control |
| Step-up and step-down MFA policies | Step-up MFA requires MFA when its conditions evaluate to true. Step-down MFA skips MFA when the Step-Up MFA policy’s conditions evaluate to true |
For API traffic, the Global Blocking Policy is one option, and REST API access policies use the adaptive framework’s filter criteria to restrict inbound ServiceNow REST API calls.
Choosing the right policy context
Each context answers a different question, and each has a Default Policy field whose options depend on the context.
| Context | When it runs | Notes |
|---|---|---|
| Pre-authentication | When a user first reaches the instance, before the login screen | Roles and groups are unknown at this point |
| Post-authentication | After credentials or the SSO response | Can use user data such as role, group and identity provider |
| MFA | During login | Decides whether MFA is enforced or skipped |
| Session validation | On requests inside a logged-in session | Uses IP, role or group filter criteria |
| Account recovery | During recovery work such as fixing SSO misconfiguration or expired certificates | At least one admin account must be registered as an account recovery user |
With Deny Policy as the default, users get access and are denied when the conditions evaluate to true. With Allow Policy as the default, access is refused and granted when they evaluate to true.
Building a group-based policy
The steps below block sign-in for members of a chosen group. They require the adaptive_auth_admin role.
- Create a group filter criteria record at All > Adaptive Authentication > Filter Criteria > Group Filter Criteria. Select New, add a name and description, list the user groups under Groups for criteria, and submit.
- Create the policy at All > Adaptive Authentication > Authentication Policies > All Policies. Select New, enter a name and description, and save.
- Under Policy Inputs, select Edit, add the group filter criteria, and save.
- Under Policy Conditions, select New, enter a label and description, choose the filter criteria in the Condition field, select is and true, and save.
- Open All > Adaptive Authentication > Auth Policy Contexts > Post Authentication Context. Set Default Policy to Deny Policy, choose the new policy in the Deny Policy field, and select Update.
The post-authentication context is the right home for this rule because group membership becomes known once the user has entered credentials.
Restricting active sessions with session validation
Session validation adds a check against session or cookie hijacking. When a session starts, the instance captures the requester’s IP address and stores it in the session and the database. A later request is rejected if its IP address differs from the stored one or falls outside the ranges you define.
To set it up, open the Session Validation Policy from the Policies list and add a policy input. The available inputs are IP, Role and Group filter criteria. Add a condition, set it to true or false depending on the input, select Active, and then set the session.validation.enabled property to true.
The session validation context accepts Allow Policy and nothing else. The session ends immediately unless a condition in the Allow Policy evaluates to true. It covers authenticated users on post-login requests, so guest sessions and native mobile apps fall outside it. It blocks a copied session cookie used on another device, and it restricts sessions from an insecure network. For the idle logout setting, see glide.ui.session_timeout settings.
Filtering access by location
Location filter criteria let a policy decide by country. You need the Zero Trust – Location Based Access plugin (com.snc.zero_trust_location_access), the adaptive authentication property enabled, and the instance running on ADCv2. Without ADCv2, user location information is unavailable.
Location filters work in the pre-authentication, post-authentication and MFA contexts, and for session access. Common uses include blocking a country, allowing access from one country, and requiring step-up MFA for logins from a given country.
To create one, go to All > Adaptive Authentication > Filter Criteria > Location Filter, select New, enter a name and description, insert the countries in the Locations tab, and submit. Administrators can create a location-based policy only when the location is available for the current user session.
A third-party service, MaxMind, resolves the location from the VPN connection and the x-forwarded-for header. If no header is populated, the VPN IP address is shown instead.
For how roles control what users can reach in the first place, see RBAC in ServiceNow. Here is a worked example for the itil role. Create a role filter input for itil with its condition set to true, and a location filter input listing the United States with its condition set to true. Place both in an Allow Access Policy, join the two conditions with AND, and assign it to the post-authentication context with Default Policy set to Allow Policy. itil users signing in from the United States get access. itil users signing in from elsewhere see the denial message set in the glide.auth.policy.ui.error.message property. An Allow Access Policy denies requests that its conditions do not match, so this rule also blocks users who lack the itil role. Check that the conditions admit everyone who should get in.
Registering and managing trusted devices
Registration must happen from inside the trusted network. After that, the user can sign in from other networks, and no specific role is required. For the user accounts that register devices, see ServiceNow user management.
- Open All > Self-Service > My Profile, or select your user name in the instance header. On Now Support, open your profile and choose Trusted Device.
- In Related Links, select Register a trusted mobile device, then select Add a new trusted mobile device.
- On the Device Registration screen of the ServiceNow mobile app, tap Scan QR code and scan the code on your laptop or desktop.
- When the login page appears, enter your credentials to sign in to the Now Mobile app.
The QR code expires within five minutes, and you can request a new one. To remove a device, select its remove icon there. A removed device must be registered again before it can reach the instance. Administrators review registrations at All > Adaptive Authentication > Device Trust > Device Registration.
Trusted mobile apps and troubleshooting
Adaptive authentication for trusted mobile apps lets people reach the instance through the Now Mobile app from outside the trusted IP network boundary, such as an employee opening the Employee Service Center from home. A trusted mobile app filter identifies requests from a trusted Now Mobile app linked to a user account. Local login, SAML, OIDC and MFA all work on that app. Admins can revoke devices and cap how many each user registers. For the wider mobile setup, see the mobile experience guides.
| Symptom | Resolution |
|---|---|
| Clock skew between the instance and the phone | Adjust or reset the clock on the mobile device |
| QR code has expired | Request a new code, or ask an administrator to extend the expiry |
| Registration fails after a system property change | Verify the registration against the changed property, using a credential valid for login |
| Maximum device count reached | Remove an existing device, or ask an administrator to raise the maximum |
Properties and event logging
Set these at All > Adaptive Authentication > Authentication Policies > Properties.
| Property | Purpose | Values |
|---|---|---|
| glide.authenticate.auth.policy.enabled | Turns authentication policies on | Yes or No |
| glide.authenticate.preauth.allow.trusted.device | Enables the Device Trust Flow | Yes or No |
| glide.trusted.device.max.count | Maximum trusted devices per user | Number |
| glide.authenticate.preauth.skip.user.registration | Skips registration from the trusted network | Yes or No |
| session.validation.enabled | Enables session validation | Yes or No, set to true after setup |
The adaptive authentication events table records decisions. Failure events from pre-authentication REST API access policies and from post-authentication REST API access policies are logged by default; enable glide.adaptive.auth.log.success.event to log post-authentication success events.
Frequently asked questions
Do trusted devices replace multi-factor authentication?
Trusted mobile app support accepts local login, SAML, OIDC and MFA as login methods, so MFA stays available on the app. Trusted device registration decides which phone can reach the instance from outside the trusted network.
Why does a group-based policy belong in the post-authentication context?
Group membership is known after the user enters credentials. The pre-authentication context runs before the login screen, so it cannot take groups into account.
What happens to a session if the IP address changes?
With session validation enabled, each request is compared against the IP address stored when the session began. A request from a different address, or from outside the defined ranges, is rejected.
Can location rules apply to all logins?
Location filters can be used in the pre-authentication, post-authentication and MFA contexts. Each rule depends on the location being available for the user session, which requires ADCv2 and the Zero Trust – Location Based Access plugin.