search cancel

How to import User Names into a Filter

book

Article ID: 203099

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

As of SMP 8.5 it is not possible to Import a csv file into a Filter Definition.  Only computers are able to be imported into filters this way.  It is possible to Import Users using Connector or Import/Export Data Rules.  We will show you how to do this below.

Environment

ITMS 8.5 and later

Resolution

How to create a Data Source and Import Rule for the purpose of Adding Users To or Removing Users from a Filter.

Before we begin, we need a Data File to import.  You can create the following file as UserImport.csv

Domain,       UserID,            FilterName
YourDomain, smpservice,     filter1
YourDomain, administrator,   filter2

How to create a Data Source

  1. Go to the Console Settings > All Settings > Notification Server > Connector >
  2. Here you will find Data Sources and Import/Export Rules.
  3. Let's start with the Data Sources.  Right-click and select New > CSV File Data Source
    1. Rename this Data Source as needed, something like "Import Users".
    2. Set the Delimiter character to Comma.
    3. Check - CSV file contains column headings.
    4. Check - Allow Import
    5. Set the location of your file "UserImport.csv"
    6. Click Save and then Test Data Source.  It should be successful. 
    7. Click View Import Data.  You should see a pop up window with your data.

      This completes our Data Source.  It should look like this:

 

How to create an Import Rule

  1. Right-Click Import/Export Rules, and select New > Filter Import Rule
  2. Set the Data Source to the one you created above
  3. Rule Type: Choose the option that you want to use.  For this test we will use "Add resources to filter(s) membership"
  4. Choose whether or not to Create Filter if it doesn't exist.
  5. Filter Name Column: set to "FilterName", as that's the name of our Filter Column in the .csv file.
  6. Filter Description: optional
  7. Resource Type: set to "User" (Scroll all the way to the bottom of the list)
    NOTE: FilterName, UserID and Domain are picked up as column headings from our CSV file. Click the Drop Downs to select them. Also, if you named your columns differently then you will have a different drop down.
  8. Resource lookup Key: set to User UserID/Domain.  User: set to UserID column heading  Domain: set to Domain column heading
    NOTE: In order to use UserID and Domain it is necessary to Import Users from Active Directory.
  9. Alternatively, you can also use a Resource lookup key of First / Last, or one of the other options.
    NOTE:
    It should look like this:

  10. Save the Data Source.  Click Run Now.
  11. You should see a window like this.  Click View Log for more details.

The number of Rows and Filters processed should match the CSV file being imported.



Attachments