What This Table Is

The sys_user table is the master repository for all user accounts in ServiceNow. It stores authentication credentials, personal information, organizational details, preferences, and access controls for every person who can log into the system. This includes employees, contractors, customers, vendors, and service accounts.

Owned by the Platform module, this table supports every ServiceNow process — ITSM, ITOM, SecOps, HR, CSM. It's the authoritative source for user identity across all applications. User records drive role-based access control, assignment logic, approval workflows, and audit trails throughout the platform.

The sys_user table extends sys_person, which provides basic contact information shared with non-user person records like customers in CSM. No tables extend sys_user directly — it's the leaf table for all authenticated users.

In large enterprises, expect 50,000 to 200,000+ user records. The table performs well for individual lookups but can be expensive for complex queries without proper filtering on indexed fields like active, user_name, employee_number, or department.

When You'll Script Against This Table

You'll hit sys_user in Business Rules validating assignments, Script Includes for user lookups, UI Policies controlling field visibility based on user attributes, Transform Maps during user imports, and Scheduled Jobs for bulk user updates. Client Scripts frequently query user preferences and profile data for form customization.

User table access is controlled by the user_admin role for full CRUD operations. Most users can read their own record and basic directory information on others. Sensitive fields like user_password and ldap_server have additional ACL restrictions.

Common scripting patterns:

  • Lookup users by user_name or employee_number for assignment validation
  • Filter by department, location, or manager for bulk operations
  • Check active status before assignments or notifications
  • Validate user roles for access control in custom applications
  • Update user preferences and profile data during onboarding
  • Query manager hierarchies for approval workflow routing
  • Sync user data with external systems via Transform Maps and Web Services

Table Gotchas

⚠️

The active field only controls login access. Users marked active=false can still be assigned to records, receive notifications, and appear in reference fields. Check locked_out and web_service_access_only for complete access status.

⚠️

The user_name field is case-sensitive in queries but case-insensitive for login. Use .toLowerCase() when comparing user names in scripts to avoid false negatives.

  • Email addresses in email field aren't unique by default — multiple users can share the same email, breaking notification logic
  • The manager field can create circular references — always check for infinite loops in approval hierarchies
⚠️

Avoid queries with .startsWith() on name fields without additional filters. They bypass indexes and timeout on large datasets. Use employee_number or user_name instead.

  • LDAP users have source set to 'ldap' — updating certain fields on these records gets overwritten on next sync
  • User records with web_service_access_only=true can authenticate via API but can't log into the UI — critical for integration user setup
Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

The sys_user table extends sys_person, inheriting basic contact fields like first_name, last_name, email, and phone. The person table supports non-user contacts in Customer Service Management.

Most table relationships involve sys_user_group for team assignments, sys_user_role for access control, task table assignments (assigned_to, caller_id), and sysapproval_approver for approval workflows. These joins are extremely common in reporting and assignment logic.

Location-based queries frequently join cmn_location via the location field for regional assignments. Department-based filtering uses cmn_department for organizational reporting and access controls. The sys_user_has_role many-to-many table connects users to roles for security evaluations.