Service Manager 2012 External User Import

Welcome everyone! Today’s blog is written by Manoj Kumar, our newest and most experienced team member in the world of System Center.

Service Manager 2012 External user Import in his words :)

 

One of the common scenarios that we come across for Service Manager 2012 is whether there’s a way to sync User CI data from SQL DB to Service Manager CMDB. Lets say a customer has user data in SQL and he wanted to import it to Service Manager on-demand.  Or Sometimes you may want to bulk import Users CIs to Service Manager.

The simplest way to get users data into the Service Manager CMDB is out of the box feature, Active Directory connector but, there are cases like where someone wants to import external uses data to SM. This is just a reference/sample solution to give you an idea how you can achieve it. You can modify it based on your need and build the your logic around it. 

One way to do this is to import them from console using a Comma-Separated Value (CSV) using creating CSV connectors on CodePlex site http://scsmcsvconnector.codeplex.com/

There are two ways here you can feed the data to SM 12 one, run PowerShell script manually or  automate it using Orchestrator (SCOrch) (Download the sample scripts from here http://sdrv.ms/18eE7xX )

What is the CSV Import Feature? http://blogs.technet.com/b/servicemanager/archive/2009/05/26/using-the-csv-import-feature.aspx

The CSV Import Feature is a Service Manager component that allows users to bulk-import instances of any class type or projection type defined in the Service Manager Configuration Management Database (SMCMDB).

To import a set of instances using the CSV Import Feature, two files are required:

1. A data file that consists of a series of comma-delimited object instances. The data file must end with the ".csv" file extension.

2. A format file that specifies the class type or projection type of the instances present in the data file. Every instance in the data file is assumed to be of the this type. The format file must have the same file name as the CSV file that it describes, and it must end with the ".XML" file extension.

 

Automating the Process in SCSM 2012 using System Center 2012 Orchestrator (SCOrch)

clip_image002

 

Assuming you have data in SQL the way Service Manger can accept (based on usrers.xml file)

clip_image004

 

This is  a sample Runbook to automated CSV import (shown in the figure below), performs the following steps: (you can download users.csv, users.xml and sample orchestrator Runbook from here http://sdrv.ms/18eE7xX )

clip_image006

1. SQL Import:

1. Brings the data from SQL table to C:\Import\User.csv. You need to have User.xml file in the same path.

clip_image008

2. 2. Feed the data to SCSM DB.

PowerShell Script read the c:\Import\Users.csv and c:\Users.xml file and feed the data to SCSM DB.

clip_image009

3. 3. This step will back-up(Move) your Users.csv file, so that you will have backup of last import done moreover, SQL import step will not override the Users.csv file.

clip_image011

 

 

Now you should be able to see external user data in Service Manager CMDB , this will allow you to create Tickets for Exported Users.

 

We hope this blog was informative .

Happy Reading :)

- A Team !

Comments

  • Anonymous
    October 17, 2013
    Hello, I followed your instructions and I was able to get this to work as a test by manually running the import and feed scripts.  However, when I import the users, I am seeing a user get imported that is built by the headings of the csv file.  For example, the User Name is "User Name", the Domain is "User Domain" etc.  Is their any way to change the script to prevent his?  I guess the other option would be to modify the csv file manually before running the import. Thank you, Ralph Kyttle

  • Anonymous
    April 08, 2014
    Hi, is there any user.csv & user.xml templates to import Non-Domain users for the System.User class?
    or is it necessary (best practice) to create the users in AD prior import ?
    All I was able to find was information to import Domain Users (System.domain.user) for which the connector does very well already.

  • Anonymous
    April 08, 2014
    Thank you in advance

  • Anonymous
    March 11, 2015
    How does this work if using via the self service portal? will the external user be able to create a service request ?

  • Anonymous
    June 04, 2015
    same issue import is successful but iam unable to find any of the users