The Microsoft SCCM integration is a one direction import of SCCM data into the ServiceNow's Configuration Management Database (CMDB).
This article is a supplement to the ServiceNow documentation. For full documentation please see the ServiceNow Documentation
Please note that it is important to try this integration in a development instance first and test the integration before going live in production.
SCCM Data Import Process
Step 1: Plugin Activation
These are the plugins for the currently supported SCCM versions, all of which support Asset Intelligence and Incremental Software Reconciliation:
Microsoft SCCM 2007
Microsoft SCCM 2012 v2
Microsoft SCCM 2016 (also compatible with SCCM version 1702 and 1802).
Once you determine what plugin to install, activate the correct plugin:
Navigate to System Definition > Plugins.
Find the plugin with the filter criteria and search bar.
Activate the plugin.
Step 2: Midserver Installation
In most cases, a mid server is necessary to facilitate the communication between SCCM and ServiceNow.
ServiceNow Documentation on Midserver
Step 3: Create SCCM Account
Microsoft SQL Server Management Studio
Have an SCCM administrator login into SQL Server Management Studio
Server type: Database Engine
Server name: <your SCCM SQL Server>
Go to Security > Logins
Right Click Logins, and Select New Login…
General Page. SQL Server Authentication: true
Login name: <select login name>
Password: <select password>
Enforce password policy: true
Default Database: <select your sccm database>
User Mapping Page
Select SCCM Database
Add Database Role: db_datareader
Click Ok
Step 4: Integration Setup
Navigate to Integration - Microsoft SCCM <version> > Setup.
Work with your SCCM admin to complete the required fields to configure connection to the SCCM SQL database. Make sure to include a valid MID Server that has access to the SQL database server.
Under Related Links, click Test data source connections to test the connection to the SCCM database.
SCCM Data Import Setup
Step 5: Scheduled Data ImportS
Activate the correct scheduled data imports for your SCCM Integration
Computer Identity (Main Import)
Navigate to Integration - Microsoft SCCM > Scheduled Import.
Select a calendar interval (Day, Week, etc.) in the Run field and specify the time of day the import should run.
Select the “Run as” user for the data import. Use your own account if you want to be famous. :)
Click Save
Child Imports (Common)
Configure Child Scheduled Imports. Underneath the Parent “SCCM 2016 Computer Identity” import, there are child imports that run after completion. Deactivate or Activate imports as needed.
SCCM 2016 Operating System. This is supplemental import that updates the cmdb_ci_computer table with Operating System information.
SCCM 2016 Processor. This is supplemental import that updates the cmdb_ci_computer table with Operating System information.
SCCM 2016 Disk. This is supplemental import that updates the cmdb_ci_disk table. For large SCCM databases, sometimes this is turned off due to size.
SCCM 2016 Network. This is supplemental import that updates the cmdb_ci_network_adapter table. For large SCCM databases, sometimes this is turned off due to size.
Child Imports (Asset Intelligence)
Asset Intelligence is an SCCM feature that can filter, normalize and clean up software records. When enabled, it populates normalized software data in a separate table within the SCCM database. You can target this separate table instead of the raw software data table. When you import software records into the CMDB with this feature enabled, you get a cleaner set of software data.
If you have AI for SCCM, you’ll need to activate some Scheduled Imports and disable others
SCCM 2016 Software. This is for non-AI scheduled imports. This is activated by default, deactivate if using AI.
SCCM 2016 Removed Software. This is for non-AI scheduled imports. This is activated by default, deactivate if using AI.
SCCM 2016 Software (with AI). This is for AI scheduled imports. This is deactivated by default, activate if using AI.
SCCM 2016 Removed Software (with AI). This is for AI scheduled imports. This is deactivated by default, activate if using AI.
Child Imports (Software Usage)
SAMP Usage 2016 Import. If you installed the Integration - Microsoft SCCM 2016 Software Usage plugin, this datasource may be available. If you receive errors using this datasource, SCCM data may not be available.
SCCM 2016 Software Edition. Updates cmdb_sam_sw_install table with Edition
SCCM 2016 Software Last Used. Updates samp_sw_usage table with time software last used. If you receive errors using this datasource, SCCM data may not be available.
Step 5: DISCOVERY
If you are using Discovery along with SCCM, you may want to configure Discovery Definition properties.
Step 6: Transform Maps
Software Asset Management
If you are using Software Asset Management (Foundation or Professional), you’ll want to double check if the correct transform map is enabled.
If SAM is enabled:
Incremental Import 2016: Deactivate
Incremental Import (SAM enabled) 2016: Activate
If SAM is not enabled:
Incremental Import 2016: Activate
Incremental Import (SAM enabled) 2016: Deactivate
STEP 6: Additional Properties
Assigned To User
If you use a different matching field for user imports and sccm, this may need adjustment.
The SCCM <version> Computer Identity transform script attempts to set the Assigned to field in the CMDB record by looking up the name of the user in the SCCM source table and comparing the value with the matching field in the ServiceNow sys_user table. If a match is found, that user is assigned to the record. If no match is found, the Assigned to field is left blank.
The matching field is controlled by the glide.discovery.assigned_user_match_field system property, which is set to user_name by default.
Lenovo Computers
This is a fix for Lenovo computers not storing the model name in the model field. I’ve had trouble getting this to work, but it may work for you. If you use Lenovo computers, here is the fix to get the model name into the model field.
Update the Computer Identity datasource with this line
v_GS_COMPUTER_SYSTEM_PRODUCT.Version0 as Version
That will get you the friendly name for Lenovo models.
Update the Computer Identity Tranform Map with an updated script.
function setMakeAndModel() {
//updated for lenovo changes
var realModel = '';
if(source.u_manufacturer == 'LENOVO'){
realModel = source.u_version;
}else{
realModel = source.u_model;
}
var mm = MakeAndModelJS.fromNames(source.u_manufacturer, realModel, "hardware");
target.model_id = mm.getModelNameSysID();
target.manufacturer = mm.getManufacturerSysID();
}
Discovery Source
On the Computer Identity Transform Script, it is useful to add that the discovery source came from SCCM. Although this may be overwritten by other imports:
target.discovery_source = 'SCCM';
Step 7: Execute Now
On the Computer Identity Scheduled Data Import, click Execute Now to perform the import immediately.
After the instance imports data using the SCCM <version> Computer Identity data source, the other data sources run in the order configured to retrieve the remainder of the SCCM data.