ServiceNow Multi-Factor Authentication (MFA) provides an additional security layer by requiring users to verify their identity using multiple authentication factors beyond username and password. This integration addresses the critical business need for enhanced security compliance, reducing the risk of unauthorized access to sensitive ITSM data and meeting regulatory requirements like SOX and GDPR. Organizations typically implement MFA to protect privileged accounts, secure remote access, and satisfy audit requirements while maintaining user productivity. The MFA implementation supports bidirectional authentication flows including TOTP-based authenticators, push notifications through Duo Security and Okta Verify, and SMS-based verification codes. The primary automation pattern involves real-time authentication challenges triggered by login attempts, role-based access changes, or high-risk activities, with configuration managed through the System Security module and User Administration application in ServiceNow.
Prerequisites
- •ServiceNow Rome release or later with System Security plugin activated
- •Admin role or security_admin role assignment in ServiceNow instance
- •Valid licenses for third-party MFA providers like Duo Security or Okta if using external integrations
- •Network connectivity from ServiceNow instance to MFA provider APIs on ports 443 and 80
- •Active Directory or LDAP integration configured if using enterprise authentication
- •Email and SMS gateway configuration for delivery of authentication codes
- •Mobile device management policy allowing authenticator app installations for end users
Architecture Overview
ServiceNow MFA implementation leverages the built-in Authentication Extensions framework along with optional Integration Hub spokes for external providers like Duo Security and Okta Verify. Authentication credentials for external MFA providers are securely stored using Connection & Credential Aliases in the Connections & Credentials application, with encrypted credential storage preventing exposure of API keys and secrets. The data flow is bidirectional, with outbound authentication requests sent to MFA providers during login challenges and inbound webhook responses confirming authentication status, triggered by user login events and policy evaluations. A MID Server is required only when integrating with on-premises MFA infrastructure or when ServiceNow instance cannot directly reach external MFA provider APIs due to network restrictions. Rate limiting considerations include Duo Security's 100 requests per minute per integration key and Okta's 10,000 API calls per hour per organization, requiring careful configuration of retry logic and exponential backoff in custom authentication scripts.
Sourdough: ServiceNow Monitoring and Analytics
A Chrome extension for ServiceNow Admins and Developers with essential tools, analytics, graphs and monitoring features.
Free to install. Pro $5/month after a 14-day no-card trial.
Pro requires the ServiceNow admin role. Upgrade inside the extension.
Implementation Steps
Enable Multi-Factor Authentication plugin and configure base settings
Navigate to System Definition > Plugins and activate the Multi-Factor Authentication plugin (com.glideapp.authenticator.radius) which provides the foundational MFA framework. Once activated, go to System Security > Multi-Factor Authentication > Properties to configure global MFA settings including session timeout values, grace period duration, and enforcement scope. Set the 'glide.authenticate.multifactor.enabled' system property to true and configure 'glide.authenticate.multifactor.providers' to include your chosen authentication methods. Verify the plugin activation by confirming that new MFA-related tables like sys_auth_profile and sys_mfa_device are created and accessible through the application navigator.
Create and configure external MFA provider credentials in ServiceNow
Navigate to Connections & Credentials > Credentials and create a new credential record for your MFA provider, selecting the appropriate credential type such as 'API Key Credentials' for Duo Security or 'OAuth 2.0 Credentials' for Okta Verify. For Duo Security integration, populate the Integration Key field with the key from your Duo Admin Panel and store the Secret Key in the password field, ensuring the API hostname matches your Duo deployment region. Configure the Connection Alias by navigating to Connections & Credentials > Connection & Credential Aliases, creating a new alias that references your credential record and sets the connection URL to the appropriate MFA provider endpoint. Test the credential configuration using the 'Test Connection' functionality to verify authentication parameters are correctly established before proceeding with authentication profile setup.
// Test Duo Security credential configuration
var rm = new sn_ws.RESTMessageV2();
rm.setEndpoint('https://api-{hostname}.duosecurity.com/auth/v2/check');
rm.setHttpMethod('POST');
rm.setBasicAuth('{integration_key}', '{secret_key}');
var response = rm.execute();
gs.info('Duo connection test response: ' + response.getStatusCode());Configure TOTP authenticator support for built-in MFA capabilities
Navigate to System Security > Multi-Factor Authentication > Authenticator and create a new authenticator configuration record with type set to 'TOTP' for Time-based One-Time Password support. Configure the TOTP parameters including the secret key length (typically 32 characters), time window duration (30 seconds standard), and hash algorithm (SHA-1 or SHA-256 based on security requirements). Set the issuer name to your organization identifier and configure the QR code generation settings to allow users to easily enroll their mobile authenticator applications like Google Authenticator or Microsoft Authenticator. Test the TOTP configuration by generating a test QR code and verifying that time-based codes generate correctly using a mobile authenticator app before enabling for user enrollment.
// Generate TOTP secret for user enrollment
var TOTPUtil = new global.TOTPUtil();
var userSysId = gs.getUserID();
var secret = TOTPUtil.generateSecret(32);
var qrCodeData = TOTPUtil.generateQRCodeData(secret, gs.getUser().getEmail(), 'ServiceNow Production');
gs.info('TOTP QR Code data: ' + qrCodeData);Set up Duo Security integration using Integration Hub spoke
Navigate to Process Automation > Flow Designer and install the Duo Security spoke from the ServiceNow Store if not already available, then create a new flow that utilizes the 'Duo Auth API' action for authentication verification. Configure the Duo connection by referencing the credential alias created in step 2 and set up the authentication flow to handle both push notifications and passcode verification methods. Create a script include that interfaces with the Duo authentication API, implementing proper error handling for network timeouts, invalid responses, and rate limiting scenarios. Test the Duo integration by creating a test user in both ServiceNow and Duo Admin Panel, then verify that authentication requests properly trigger push notifications or accept valid passcode entries.
// Duo Security authentication verification
var DuoAuth = Class.create();
DuoAuth.prototype = {
initialize: function() {
this.restMessage = new sn_ws.RESTMessageV2('Duo Security', 'auth');
},
verifyAuth: function(username, factor, device) {
this.restMessage.setStringParameterNoEscape('username', username);
this.restMessage.setStringParameterNoEscape('factor', factor);
this.restMessage.setStringParameterNoEscape('device', device);
var response = this.restMessage.execute();
var responseBody = response.getBody();
var responseObj = JSON.parse(responseBody);
return responseObj.response.result === 'allow';
}
};Configure Okta Verify integration and push notification setup
Navigate to System Web Services > Outbound > REST Message and create a new REST Message record named 'Okta MFA API' with the endpoint URL pointing to your Okta organization's API endpoint (https://{org}.okta.com/api/v1/authn). Configure the authentication using the OAuth 2.0 credential created earlier and set up HTTP methods for challenge initiation and verification status polling. Create a business rule that triggers MFA challenges during high-risk authentication scenarios, implementing the Okta Verify push notification workflow with proper status polling and timeout handling. Test the Okta integration by enrolling a test user in Okta Verify mobile app and verifying that push notifications are received and properly validated through the ServiceNow authentication flow.
// Okta Verify push notification challenge
var OktaMFA = Class.create();
OktaMFA.prototype = {
sendPushChallenge: function(userId, stateToken) {
var rm = new sn_ws.RESTMessageV2('Okta MFA API', 'post');
rm.setRequestHeader('Accept', 'application/json');
rm.setRequestHeader('Content-Type', 'application/json');
var payload = {
stateToken: stateToken,
factorType: 'push',
provider: 'OKTA'
};
rm.setRequestBody(JSON.stringify(payload));
var response = rm.execute();
return JSON.parse(response.getBody());
}
};Implement step-up authentication policies and conditional access rules
Navigate to System Security > Multi-Factor Authentication > Authentication Policies and create conditional access rules that trigger additional authentication based on risk factors such as unusual login locations, privileged role access, or sensitive data operations. Configure step-up authentication policies that evaluate user context including IP address geolocation, device fingerprinting, and time-based access patterns to determine when additional verification is required. Set up policy conditions using business rules that examine the current user session, requested resources, and risk scoring algorithms to dynamically adjust authentication requirements. Create exception handling for emergency access scenarios while maintaining audit trails and compliance logging for all step-up authentication events and policy decisions.
// Step-up authentication policy evaluation
var StepUpAuth = Class.create();
StepUpAuth.prototype = {
evaluateRisk: function(userSysId, ipAddress, requestedResource) {
var riskScore = 0;
// Check for unusual IP address
var userLocationGR = new GlideRecord('sys_user_location_history');
userLocationGR.addQuery('user', userSysId);
userLocationGR.addQuery('ip_address', '!=', ipAddress);
userLocationGR.query();
if (userLocationGR.getRowCount() === 0) riskScore += 30;
// Check for admin access
if (gs.hasRole('admin') || gs.hasRole('security_admin')) riskScore += 40;
// Check time of access
var currentHour = new GlideDateTime().getHour();
if (currentHour < 6 || currentHour > 22) riskScore += 20;
return riskScore > 50;
}
};Configure service account bypass rules and emergency access procedures
Navigate to System Security > Multi-Factor Authentication > Bypass Rules and create exemption policies for service accounts, integration users, and emergency access scenarios that require MFA bypass while maintaining security controls. Configure bypass rules based on specific criteria including user account types (service accounts with 'web_service_admin' role), source IP address ranges for trusted integration endpoints, and time-limited emergency access tokens. Implement audit logging for all bypass events by creating custom audit rules that capture bypass reason codes, requesting administrator identity, and business justification for compliance reporting. Set up automated bypass rule expiration and review processes using scheduled jobs that alert security administrators when bypass rules approach expiration dates or exceed usage thresholds.
// Service account MFA bypass validation
var MFABypass = Class.create();
MFABypass.prototype = {
shouldBypassMFA: function(userSysId, sourceIP) {
var userGR = new GlideRecord('sys_user');
userGR.get(userSysId);
// Check if service account
if (userGR.getValue('internal_type') == 'service' || gs.hasRole('web_service_admin')) {
gs.log('MFA bypass granted for service account: ' + userGR.getValue('user_name'));
return true;
}
// Check trusted IP ranges
var trustedRanges = ['10.0.0.0/8', '192.168.0.0/16'];
for (var i = 0; i < trustedRanges.length; i++) {
if (this.isIPInRange(sourceIP, trustedRanges[i])) {
return true;
}
}
return false;
}
};Test MFA implementation and configure monitoring and reporting
Navigate to System Security > Multi-Factor Authentication > Test and create comprehensive test scenarios covering TOTP authentication, external provider integration, step-up authentication triggers, and bypass rule functionality using test user accounts. Configure monitoring dashboards in Performance Analytics or create custom reports that track MFA adoption rates, authentication success/failure metrics, bypass rule usage, and security policy violations. Set up automated alerting for suspicious authentication patterns including multiple failed MFA attempts, unusual bypass rule usage, or external provider API failures using Event Management and Notification framework. Validate the complete MFA workflow by testing user enrollment processes, authentication challenges across different device types, and emergency access procedures while documenting all test results for compliance and audit purposes.
// MFA monitoring and reporting query
var MFAReporting = Class.create();
MFAReporting.prototype = {
generateMFAReport: function(startDate, endDate) {
var reportData = {
totalAttempts: 0,
successfulAuth: 0,
failedAuth: 0,
bypassUsage: 0
};
var authLogGR = new GlideRecord('sys_audit');
authLogGR.addQuery('tablename', 'sys_user_session');
authLogGR.addQuery('sys_created_on', '>=', startDate);
authLogGR.addQuery('sys_created_on', '<=', endDate);
authLogGR.query();
while (authLogGR.next()) {
reportData.totalAttempts++;
if (authLogGR.getValue('newvalue').indexOf('mfa_success') > -1) {
reportData.successfulAuth++;
}
}
return reportData;
}
};Common Use Cases
Privileged User Access Protection
Automatically trigger MFA challenges when users with administrative roles (admin, security_admin, or itil_admin) attempt to log in or escalate privileges within ServiceNow. The system evaluates user roles in real-time and enforces additional authentication through TOTP or push notifications before granting access to sensitive configuration areas. This use case involves the sys_user_role and sys_user_session tables to track role assignments and authentication states, delivering critical security value by preventing unauthorized administrative access even if primary credentials are compromised.
Risk-Based Authentication for Remote Access
Implement dynamic MFA requirements based on login location, device fingerprinting, and access patterns to identify potentially risky authentication attempts from unfamiliar locations or devices. The system analyzes historical login data stored in sys_user_location_history and device registration tables to calculate risk scores and trigger step-up authentication when anomalies are detected. Business rules monitor authentication events and automatically invoke MFA challenges for high-risk scenarios, providing adaptive security that balances user experience with threat protection while maintaining detailed audit logs for compliance reporting.
Sensitive Data Access Controls
Enforce MFA verification when users attempt to access or modify high-value records such as financial data, customer PII, or security configurations within ServiceNow applications. Custom business rules evaluate record classification levels and user clearance to determine when additional authentication is required before allowing read or write operations. The implementation leverages record-level security controls integrated with MFA workflows, ensuring that sensitive information remains protected even during active user sessions, with automatic timeout policies that require re-authentication for extended sensitive data operations.
Compliance-Driven Authentication for SOX and GDPR
Meet regulatory compliance requirements by implementing mandatory MFA for all users accessing financial systems integration points, customer data repositories, or audit trail configurations as required by SOX, GDPR, and other regulatory frameworks. The system maintains detailed authentication logs in compliance-ready formats and generates automated reports showing MFA coverage, exemption usage, and policy adherence metrics. Integration with ServiceNow's Risk and Compliance applications provides centralized governance and audit trail management, ensuring that authentication policies align with organizational compliance objectives and regulatory examination requirements.
Emergency Access with Controlled Bypass Procedures
Provide emergency access mechanisms that allow temporary MFA bypass during critical incidents while maintaining strict approval workflows, audit logging, and automatic expiration controls. Emergency access tokens are generated through approval workflows involving incident commanders and security personnel, with all bypass events logged to dedicated audit tables for post-incident review. The system automatically revokes emergency access after predefined time periods and requires additional approvals for extensions, ensuring that incident response capabilities are maintained without compromising long-term security posture or creating persistent security vulnerabilities.
Troubleshooting
MFA authentication fails with 'Invalid TOTP code' despite correct code entry
Verify time synchronization between ServiceNow instance and user device by checking the system clock drift tolerance settings in MFA configuration. Navigate to System Security > Multi-Factor Authentication > Properties and adjust the 'glide.authenticate.totp.time_window' property to allow for slight clock variations (typically 30-90 seconds). Check the sys_auth_log table for detailed error messages and verify that the TOTP secret was properly generated and enrolled. If the issue persists, regenerate the TOTP secret for the affected user and ensure their authenticator app is configured with the correct time zone and automatic time synchronization enabled.
Duo Security push notifications not reaching user devices
Examine the Outbound HTTP Requests log under System Web Services > Outbound > HTTP Requests to verify that API calls to Duo Security are completing successfully with 200 status codes. Check the Duo Admin Panel to confirm that the user's device is properly enrolled and active, and verify that the Integration Key and Secret Key credentials are correctly configured in ServiceNow. Review network connectivity by testing the connection from System Diagnostics and ensure that firewall rules allow outbound HTTPS traffic to api-*.duosecurity.com. If push notifications are delayed, check Duo's service status and consider implementing SMS fallback authentication methods for reliability.
Service account bypass rules not working correctly
Verify that bypass rule conditions are properly configured by checking the sys_mfa_bypass_rule table for active rules matching your service account criteria. Ensure that service accounts have the correct role assignments or user type classifications specified in your bypass rules, and confirm that IP address ranges are properly formatted using CIDR notation. Test bypass rule evaluation using the MFA testing framework and examine the sys_audit table for bypass decision logs to identify where rule matching is failing. Review the order of bypass rule evaluation as rules are processed sequentially and the first matching rule determines the bypass decision.
Okta Verify integration returns 401 Unauthorized errors
Validate the OAuth 2.0 credential configuration by testing the token refresh mechanism in the Connection & Credential Aliases application and ensuring that the client ID and client secret are correctly copied from your Okta application settings. Check that the Okta application has the appropriate API scopes granted (okta.users.read and okta.authSessions.manage) and verify that the authorization server URL matches your Okta organization domain. Review the REST Message endpoint URLs to ensure they point to the correct Okta API version and examine the sys_rest_message_log table for detailed error responses that may indicate scope limitations or expired credentials.
Step-up authentication policies triggering incorrectly for legitimate users
Review the risk scoring algorithm in your authentication policy business rules to identify overly aggressive threshold values or incorrect risk factor weightings that may be causing false positives. Check the sys_user_location_history table to ensure that IP address geolocation data is accurate and consider implementing a learning period where new locations are flagged but not blocked. Adjust policy timing windows to account for legitimate business travel or remote work patterns and implement user feedback mechanisms that allow legitimate users to report false positive triggers. Consider implementing adaptive policies that learn from user behavior patterns over time rather than relying solely on static rule-based evaluation.
MFA enrollment process failing during QR code generation
Verify that the QR code generation libraries are properly installed and accessible by checking for any missing dependencies in the system logs under System Logs > All. Ensure that the TOTP secret generation process has sufficient entropy and is not conflicting with existing user enrollments by checking for duplicate records in the sys_mfa_device table. Test QR code generation using different browsers and devices to rule out client-side rendering issues and verify that the QR code contains properly formatted TOTP URI parameters including issuer, account name, and secret. If generation continues to fail, implement alternative enrollment methods such as manual secret entry or SMS-based enrollment as fallback options.
Pro Tips
- →Implement MFA device registration workflows using Service Catalog to provide users with self-service enrollment options while maintaining IT oversight and approval processes. Create catalog items that guide users through device enrollment, generate QR codes securely, and automatically provision access based on user roles and department policies, reducing help desk burden while maintaining security controls.
- →Configure MFA session persistence using encrypted browser tokens to balance security with user experience by reducing authentication frequency for trusted devices. Implement device fingerprinting using JavaScript fingerprinting libraries and store device trust tokens in encrypted format, allowing users to maintain authentication state across browser sessions while requiring fresh MFA challenges for new or suspicious devices.
- →Establish MFA policy testing environments using ServiceNow's clone capabilities to validate authentication flows and policy changes before production deployment. Create automated test scripts that simulate various authentication scenarios including success cases, failure modes, and edge cases using REST API calls, ensuring that policy updates don't inadvertently block legitimate access or create security gaps.
- →Leverage ServiceNow's Event Management framework to create real-time MFA security monitoring that detects unusual authentication patterns, failed MFA attempts, and potential credential stuffing attacks. Configure automated incident creation for security events that exceed defined thresholds and integrate with SIEM systems using webhook notifications to provide centralized security operations center visibility.
- →Implement progressive MFA enrollment campaigns using Notification framework and scheduled jobs to gradually roll out MFA requirements across different user populations based on risk levels and business impact. Create communication workflows that educate users about MFA benefits, provide training resources, and offer hands-on support during enrollment periods to maximize adoption rates and minimize resistance.
- →Design MFA backup authentication methods including SMS, voice calls, and hardware tokens to ensure business continuity during primary authentication method failures. Maintain backup method inventory in ServiceNow asset management and create automated failover logic that seamlessly transitions between authentication methods while logging all fallback events for security analysis and compliance reporting.
Known Limitations
- —Duo Security API rate limiting restricts authentication requests to 100 calls per minute per integration key, requiring implementation of request queuing and exponential backoff logic for high-volume environments. Organizations with more than 1000 concurrent users may need multiple Duo integrations or upgraded service plans to handle peak authentication loads during business hours.
- —ServiceNow's built-in TOTP implementation does not support advanced features like biometric authentication or hardware security keys, limiting options for users who require FIDO2 or WebAuthn compatibility. Third-party authentication providers or custom development may be necessary to support modern passwordless authentication methods.
- —MFA bypass rules cannot be dynamically updated based on real-time threat intelligence feeds, requiring manual policy adjustments when new security threats emerge. The static nature of bypass rule evaluation limits the ability to implement adaptive authentication that responds to changing risk landscapes or threat indicators.
- —Cross-instance MFA synchronization is not supported natively, requiring custom integration development for organizations that need consistent MFA policies across development, test, and production ServiceNow instances. User device enrollments and authentication histories do not automatically propagate between instances during data refreshes.
- —Integration Hub Professional license is required for advanced MFA spoke functionality and custom authentication flows, with standard Integration Hub licensing limiting the number of available authentication provider connections. Organizations may need to prioritize MFA providers based on licensing constraints and user population requirements.
Frequently Asked Questions
Can ServiceNow MFA work with existing Active Directory or LDAP authentication systems?
Yes, ServiceNow MFA integrates seamlessly with existing LDAP and Active Directory authentication as an additional security layer rather than a replacement. The MFA system operates after primary authentication succeeds, allowing you to maintain current directory services while adding multi-factor protection. Configure MFA policies to trigger based on LDAP group membership or Active Directory security groups to align with existing access control structures. Integration with Microsoft ADFS or other SSO providers requires additional configuration through SAML or OAuth protocols to ensure proper authentication flow sequencing.
How does MFA affect ServiceNow mobile application authentication and offline access?
ServiceNow mobile applications support MFA through push notifications and TOTP codes, but require network connectivity for real-time authentication verification with external MFA providers. Mobile users can pre-authenticate using biometric methods on supported devices, with authentication tokens cached locally for limited offline access periods. Configure mobile-specific MFA policies that account for intermittent connectivity and implement longer session timeouts for mobile devices to balance security with usability. The ServiceNow mobile app integrates with device biometric capabilities where available, providing seamless authentication while maintaining MFA compliance requirements.
What happens to automated integrations and API access when MFA is enabled?
Service accounts and API-based integrations can be exempted from MFA requirements using bypass rules based on account type, source IP address, or specific user roles like web_service_admin. Configure dedicated service accounts with restricted permissions and network access controls rather than bypassing MFA for regular user accounts used for automation. Implement certificate-based authentication or OAuth 2.0 client credentials flow for high-security integrations that require strong authentication without human interaction. Monitor service account bypass usage through audit logs and implement automated alerting for unusual service account authentication patterns that may indicate credential compromise.
How can we implement MFA for emergency access during system outages or security incidents?
Configure emergency access procedures using time-limited bypass tokens that require multiple approvals from security and management personnel before activation. Implement emergency access workflows in ServiceNow that generate temporary bypass codes with automatic expiration, audit logging, and mandatory post-incident review processes. Create offline authentication methods such as pre-generated backup codes that can be used when external MFA providers are unavailable due to network outages. Establish alternative communication channels for emergency access coordination and ensure that incident response procedures include MFA bypass protocols that maintain security while enabling critical system access during emergencies.
What reporting and compliance features are available for MFA audit requirements?
ServiceNow provides comprehensive MFA audit trails through the sys_audit table and dedicated MFA logging tables that capture authentication attempts, bypass events, and policy changes for compliance reporting. Configure automated reports using Performance Analytics or custom reporting that track MFA adoption rates, authentication success metrics, and policy compliance across different user populations. Export audit data in compliance-ready formats for regulatory examinations and integrate with external SIEM systems for centralized security monitoring. Create dashboard views that provide real-time visibility into MFA usage patterns and security events for ongoing compliance monitoring and risk assessment activities.
Can we customize MFA challenges based on the type of data or application being accessed?
Yes, implement context-aware MFA using business rules and authentication policies that evaluate the sensitivity of requested resources, user roles, and data classification levels to determine appropriate authentication requirements. Configure step-up authentication that requires additional verification when accessing high-value records, configuration areas, or sensitive customer data within ServiceNow applications. Create custom MFA triggers based on application modules, table access patterns, or integration with data loss prevention systems to provide granular security controls. Leverage ServiceNow's role-based access control integration with MFA policies to ensure authentication requirements align with data sensitivity and user authorization levels.
How do we handle MFA for users who travel internationally or work across different time zones?
Configure MFA policies with geographic intelligence that learns user travel patterns and adjusts authentication requirements based on legitimate location changes rather than blocking all international access. Implement user self-service travel notification workflows that allow users to register travel plans in advance, temporarily adjusting their risk profiles and authentication requirements for planned location changes. Set up time-zone aware authentication policies that account for normal business hours in users' home locations and configure TOTP time drift tolerance to accommodate clock synchronization issues across different regions. Consider implementing trusted device registration that allows users to mark personal devices as trusted for international travel while maintaining additional security controls for unrecognized devices.
Test Your Knowledge
Quick 3-question quiz — see how your ServiceNow skills stack up.
A list view on a table with millions of records is slow. Best fix?
Select an answer to continue