The Memority's REST connector can be used to provision a ServiceNow instance through the ServiceNow Table API. However, some prerequisites must be met before the application can be provisioned.
This page explains how provisioning works in Memority and the prerequisites required to provision ServiceNow.
Generic REST connector prerequisites are explained on the REST provisioning page.
Definitions
What is provisioning?
See the definition of provisioning on the REST provisioning page.
What ServiceNow objects can be managed ?
The connector is able to manage user accounts (sys_user table).
Can we manage roles and groups ?
Yes, though it is not configured in the plugin. It can be added manually on top of the generated configuration by following the Application Dimensions documentation.
Memority REST connector
APIs authentication prerequisites
To be able to request the ServiceNow Table API, Memority's connector authenticates with a dedicated integration account, using Basic Authentication over HTTPS.
|
ID |
Prerequisite |
|---|---|
|
AUTH1 |
A dedicated integration account must be created on each ServiceNow instance connected to Memority. |
|
AUTH2 |
The integration account must be of type "Machine" (identity type), which marks it as "Web service access only" and allows it to authenticate with Basic Authentication on the REST API. |
|
AUTH3 |
The integration account must hold the following roles: |
Data prerequisites
|
ID |
Prerequisite |
|---|---|
|
DATA1 |
Every identity to provision must have an email address. |
|
DATA2 |
Email addresses should be unique in |
|
DATA3 |
Each identity to provision should have a login. Memority sends it as the |
|
DATA4 |
The |
Creating the integration account
|
Step |
Screenshot |
|---|---|
|
Open the User list. In ServiceNow, type "Users" in the navigator filter and click Users under User Administration, then click New. |
|
|
Create the integration user. Set a User ID (for example SVC_MEMORITY_INTEGRATION) and select the "Machine" Identity type.
|
|
|
Set a strong password on the user. Open the user record, click Set Password, click Generate, then Save Password. |
|
|
Assign the roles required by AUTH3 ( |
|
|
Send the instance host and the credentials of each environment to the integrator. |
|
ServiceNow Provisioning Plugin
Memority provides a plugin through the MIT Plugin Store to automate the installation and configuration of the ServiceNow Provisioning connector. This plugin generates all required configuration files and data for your tenant.
Prerequisites
|
Prerequisite |
Description |
|---|---|
|
Tenant initialized with memority-tenant-archetype |
The plugin updates files generated by the base tenant archetype. |
|
ServiceNow instances configured |
ServiceNow must be configured as explained above. |
|
MIT 3.0.0 or later |
The plugin is installed from the MIT Plugin Store available from MIT 3.0.0 and later. |
Installation
The plugin is installed with the standard procedure described on the Plugin Store documentation. Only the information specific to the ServiceNow Provisioning plugin is given below.
Plugin form parameters
Enter the host of each ServiceNow instance only: no https://, no path, no trailing slash. Custom domains are allowed. The plugin builds the Table API URL, the whitelist entry and the portal link from this host.
|
Parameter |
Description |
Example |
|---|---|---|
|
ServiceNow instance host - Preprod |
Host of the preprod ServiceNow instance |
|
|
ServiceNow instance host - Prod |
Host of the prod ServiceNow instance |
|
Integration account credentials
The integration account credentials must be set manually in the Memority administrator portal for both preprod and prod environments. Navigate to System → Settings → Synchronization Service and create a new setting of type CREDENTIAL: sync.connectors.prov-serviceNow.credentials (principal: user name of the integration account, secret: its password).
Data import order
Data should always be imported in the following order: the application resource of the targeted environment (resources_pprod_ProvisioningServiceNow.json or resources_prod_ProvisioningServiceNow.json), then the roles (roles_ProvisioningServiceNow.json).
What does it do ?
The generated configuration is self-sufficient and works out of the box, but it may require adjustments based on specific needs.
The plugin generates the complete configuration required for ServiceNow provisioning in just a few clicks.
It manages users on the sys_user table with a data model that includes first name, last name, email, user name and activation status. It also generates data for immediate use: one application resource per environment (preprod and prod) and one applicative role.
The application tile on the portal opens the ServiceNow Service Portal (https://<host>/sp).
The plugin supports:
-
Account creation, update and deactivation. Updates use PATCH, so fields not managed by Memority are not overwritten. Deactivation sets
active=false; the account is never deleted andlocked_outis never modified. -
Correlation on email. The connector searches
sys_userby email. If exactly one account is found it is linked, if none is found the account is created. Once linked, Memority uses the ServiceNowsys_idfor all subsequent operations, so a later change of email does not break the link. If several accounts share the same email, the connector raises an explicit error and makes no change. -
Account discovery to identify orphaned accounts. The task lists active accounts by pages of 500 records sorted on
sys_id, runs manually by default and can be scheduled with a CRON expression.
Reference fields (manager, department, company) are not mapped.
Attribute mapping
|
Memority attribute |
ServiceNow field |
Notes |
|---|---|---|
|
firstName |
first_name |
Mandatory |
|
lastName |
last_name |
Mandatory |
|
|
|
Mandatory, correlation key |
|
|
|
Unique in the ServiceNow instance. |
|
enabled |
active |
Mandatory |
|
n/a |
sys_id |
Read only, account identifier |
Technical details
Generated files
|
File |
Path |
Description |
|---|---|---|
|
prov-serviceNow-rest-definition.xml |
im/sync/src/main/resources/RestConnectorDefinition/Plugins/ProvisioningServiceNow/ |
REST connector definition with Groovy scripts for SEARCH, GET, CREATE, PATCH, DELETE, DISCOVER operations |
|
prov-serviceNow-rest-connector.xml |
im/sync/src/main/resources/ConnectorDefinition/Plugins/ProvisioningServiceNow/ |
Links the REST connector with the application file |
|
prov-serviceNow-rest-application.xml |
im/sync/src/main/resources/Application/Plugins/ProvisioningServiceNow/ |
Maps attributes from Memority to ServiceNow |
|
prov-serviceNow-rest-applicationProfile.xml |
im/sync/src/main/resources/ApplicationProfile/Plugins/ProvisioningServiceNow/ |
Links the application file to the technical right |
|
sync.connectors.prov-serviceNow.defaultUrlPrefix.xml |
im/sync/src/main/resources/Setting/ServiceNow/Plugins/ProvisioningServiceNow/ |
Default URL prefix of the ServiceNow Table API |
|
_sync.connectors.prov-serviceNow.credentials.xml |
im/sync/src/main/resources/Setting/ServiceNow/Plugins/ProvisioningServiceNow/ |
Reminder file for the integration account credentials |
|
accountDiscovery-serviceNow-TaskDefinition.xml |
im/sync/src/main/resources/AccountDiscoveryTaskDefinition/Plugins/ProvisioningServiceNow/ |
Account discovery task |
|
app.prov.APP_CCC00050.xml |
im/idm/src/main/resources/Right/Application/Plugins/ProvisioningServiceNow/ |
Provisioning right for ServiceNow resource |
|
resources_pprod_ProvisioningServiceNow.json |
im/idm/src/main/data/Plugins/ProvisioningServiceNow/ |
ServiceNow application resource (preprod) |
|
resources_prod_ProvisioningServiceNow.json |
im/idm/src/main/data/Plugins/ProvisioningServiceNow/ |
ServiceNow application resource (prod) |
|
roles_ProvisioningServiceNow.json |
im/idm/src/main/data/Plugins/ProvisioningServiceNow/ |
ServiceNow applicative role |
Updated files
|
File |
Path |
Description |
|---|---|---|
|
_citadel-i18n_export.xml |
shared/i18n/src/main/resources/ |
Added i18n keys for ServiceNow labels |
|
whitelisting.xml |
shared/tcf/src/main/resources/WhiteListing/ |
Added ServiceNow instance host to whitelist |
|
report-prov-applications.xml |
im/idm/src/main/resources/ReferenceTable/ |
Added ServiceNow provisioning to monitoring table |
|
vars_preprod.properties,
|
im/sync/ |
Added ServiceNow environment variables for preprod and prod |
|
vars_preprod.properties, vars_prod.properties |
shared/tcf/ |
Added ServiceNow host variable for whitelist |
Troubleshooting
HTTP error on account creation
This error can occur for several reasons. For better debugging you can enable the logs of the Synchronization service in the Memority ADM portal.
Several accounts share the same email
The connector does not choose between them and makes no change. The sys_id of the accounts concerned are in the synchronization logs. Clean up the duplicates in ServiceNow.
Account is not created for an identity
Verify that the identity has an email address and that it does not exceed 100 characters. Both cases are refused with an explicit error in the synchronization logs.
Connection error or timeout
Check that the host entered in the form is the host of the instance, without https:// or a path. Check that shared/tcf/vars_<env>.properties contains tcf.internetWhitelist.servicenow.prov=<host>:443.
Account discovery reports accounts that cannot be linked
ServiceNow accounts with an empty email cannot be correlated. Complete their email in ServiceNow.