ServiceNow Connector Overview
Introduction
The ServiceNow connector for Glean allows Glean to fetch and index content from Knowledge Articles, Service Catalog items, ITSM incidents, APM Business Applications and SPM demands, Epics and Projects ensuring that users can search for and access documents for which they have authorized permissions.
- Authentication: is done by creating a dedicated user account with specified permissions and profiles
- API Usage: Glean will use the Table API and then Scripted REST API for advanced user criteria
- Permissions Enforcement: Glean respects all user access permissions, ensuring users only see search results for documents they have access to. When a user clicks on a search result, they are taken to the ServiceNow web application, which enforces the permission
- Data Storage: All data is stored in the customer’s project within the customer’s cloud account, ensuring no data leaves the customer’s environment
Content Captured:
For ServiceNow, Glean will capture the following content:
- Knowledge Articles
- Service Catalog
With additional permissions and configuration, Glean will capture the following content:
- ITSM
- APM
- SPM
ServiceNow Permissions
- Admin access to setup the connector
- Admin access for the Service Account is preferred (Custom role can be defined)
Disclaimer: Please be advised that Glean does not recommend utilizing a ServiceNow account associated with an employee. If the employee departs from the company or if the account becomes disabled, it will adversely affect access to data sources.
Versions Supported
There are no specific version limitations of the ServiceNow connector.
Objects Supported
Knowledge articles:
- knowledge base
- short description
- workflow state
- created by
- description
- knowledge base category
- view count
- custom fields (for knowledge articles created from custom templates)
Catalog items:
- title
- created by
- short description
- description
- catalog category
- sc_catalogs
ITSM:
- number
- short description
- description
- comments and work notes
- state
- priority
- impact
- urgency
- category
- assigned to
- opened by
Authentication Mechanism
Connector credentials requirements
The Service connector for Glean requires specific permissions to function correctly.
- Glean requires authentication by utilizing a dedicated Service Account and OAuth Application
- Glean understands all user access permissions and strictly enforces them at the time of the query, ensuring that users cannot see results to which they do not have access.
- It’s important to note that all data is stored in the customer’s project in the customer’s cloud account, and no data leaves the customer’s environment.
- Glean only requires READ-level permissions.
Role | Use Case |
---|---|
knowledge_admin | Required to fetch Knowledge Articles. This role allows us to view all Knowledge Articles and Knowledge Bases in the global instance. |
user_criteria_admin | Required to fetch user criteria. |
user_admin | Required to fetch ServiceNow users |
catalog_admin | Required to fetch Catalog items |
web_service_admin | Required in advanced setup so that we can access the scripted API |
snc_read_only | Effectively restricts the service account user to readonly |
snc_internal | Required to allow access to internal resources |
itil | Required to fetch ITSM Incidents |
sn_apm.apm_user | Required to fetch APM Business Applications |
it_project_user | Required for SPM Projects |
it_demand_user | Required for SPM Demands |
scrum_user | Required for SPM Epics |
safe_scrum_user | Required for SPM Epics |
Creating a Service Account in ServiceNow
Create a service account that Glean will use for fetching information from ServiceNow:
-
Navigate to Organization > Users and click New.
- Set User ID to gleansearch
- Check Web service access only.
- Set the Time zone to GMT. This is required for Glean to pick up new content updates.
- Leave the remaining fields as-is. Click Submit.
-
Click on the gleansearch user that was created.
- Click Set Password and choose a strong password (save for connector setup).
Provide access to sys_audit_delete table
Access to the sys_audit_delete table will result in faster updates to document permissions when identity data changes.
-
Create a new role: read_access_sys_audit_delete:
- Navigate to User Administration → Roles.
- Click on New and enter the name as
- read_access_sys_audit_delete
- Click Save.
-
Add an ACL rule that gives this role read access to the sys_audit_delete table:
- Elevate role to security_admin to be able to create a new ACL.
- Navigate to System Security → Access Control (ACL).
- Click on New and enter the following details.
- Type: record
- Operation: read
- Name: Select the sys_audit_delete table
- Add the new read_access_sys_audit_delete role under Requires role
- Click Submit.
-
Assign the new role read_access_sys_audit_delete to gleansearch user.
Configure an OAuth Application
OAuth will provide access tokens to Glean acting as the previously configured user.
- Navigate to System OAuth → Application Registry and click New.
- Click Create an OAuth API endpoint for external clients.
- Set Name to Glean Search OAuth.
- Set Refresh Token Lifespan to 2,147,483,647.
- Set Access Token Lifespan to 86,400.
- Leave the remaining fields as defaults and Click Submit.
Validate System Properties:
- Navigate to the System Properties List (All → Enter sys_properties.list).
- Identify and note the system property glide.knowman.apply_article_read_criteria and its value.
- Identify and note the system property glide.knowman.block_access_with_no_user_criteria and its value.
- Identify if there are any Knowledge Article templates enabled and want to index template-based articles.
- Navigate to All → System Applications → All Available Applications → All
- Search for the plugin Knowledge Management Advanced (com.snc.knowledge_advanced) and check if it is enabled.
To learn more about knowledge article templates here.
Creating a Custom Role in ServiceNow
In cases where admin privileges are unavailable as a ServiceNow user, Glean will be able to recreate the same Glean experience with a user as a custom role. The majority of steps will be the same as listed in the ServiceNow Connector setup instructions, except for the following:
Note: The User fetching on behalf of does not need to be an admin (or have admin privileges). However, an admin (or a user with security_admin privileges) must complete some of the following steps.
-
Create the user that will be used and name it: gleansearch
-
Create a custom role named: CustomRole
-
Click on the user (Organizations → Users) and then set CustomRole for the user gleansearch under Roles
-
When creating the ACL Rule (System Security → Access Control (ACL)) for the Scripted REST API, then set CustomRole as the role for the ACL Rule.
-
Set the ACL Rule that requires the CustomRole for both the new Scripted REST API and the /user_criteria endpoint.
-
In step 2, instead of setting roles for the user, provide read access to the necessary tables (see below). As a security admin, create a new ACL Rule for each table, granting CustomRole the read record access. Provide the read access for all fields of the table in a separate ACL Rule. Create two ACL Rules for each of the following tables:
- sys_user
- sys_user_role
- sys_user_has_role
- sys_user_group
- sys_user_grmember
- user_criteria
- kb_knowledge
- kb_knowledge_base
- kb_uc_can_read_mtom
- kb_uc_cannot_read_mtom
- kb_uc_can_contribute_mtom
- kb_uc_cannot_contribute_mtom
- kb_category
- kb_use
- sc_cat_item
- sc_cat_item_user_criteria_mtom
- sc_cat_item_user_criteria_no_mtom
- sc_category
- sc_catalog
- topic
- sys_audit_delete (if provided access)
- incident (if enabled)
- cmdb_ci_business_app (if enabled)
- dmn_demand (if enabled)
- pm_project (if enabled)
- rm_epic (if enabled)
-
Add the itil (Information Technology Infrastructure Library) role to the user gleansearch. This enables the user to read tables interaction (Interactions) and sc_request (Requests)
-
Follow the subsequent steps as described in the instructions.
Example of the ACLs: ACL to read the table (e.g. sys_user)
ACL to read the properties of the table (e.g. sys_user.*)
API Endpoints
Glean uses the Table API to crawl relevant tables for ServiceNow content and permissions. For this, we have you create a dedicated ServiceNow user with access to the required tables through the Table API. We also use a Scripted Rest API that is configured as part of the setup to crawl advanced user criteria.
Format of the Table API calls are displayed below
https://<servicenowDomain>/api/now/<tableName>
Additionally, in the case of advanced user criteria, we have you create a scripted REST API endpoint to return the user criteria for a given user. The endpoint looks like:
https://<servicenowDomain>/api/now/<app_scope>/gleansearch/user_criteria
(Rest of the document continues with tables and details about content, identity, activity, rate limits, update frequency, crawl process, and troubleshooting/FAQ sections)
Was this page helpful?