Skip to main content

NIM

Step 5: Add a name generator to generate a sAMAccountName, userPrincipalName, and cn (tutorial)

In this step, we'll create a name generator that generates some attributes we'll need for our AD account mappings, including the sAMAccountName, userPrincipalName, and cn.

Add the name generator
  1. Go to Processing > Name Generation.

  2. Click Add.

  3. Enter a Generator Name.

    For this example, we'll call it ng_AD, following the convention ng_TargetSystem. You can use any convention you want, but starting your name generators with ng_ helps differentiate them throughout the NIM interface.

    2023-07-06_15-20-11.jpg
  4. Click Create.

    2023-07-06_14-23-33.jpg
Configure the name generator
  1. For the Based On Filter, select the HR500_AD_User_Create filter we created previously. The Columns pane is populated with the filter's output columns.

    2023-07-06_15-13-29.jpg
  2. In the Columns pane, click the > button to preview the first record from the filter.

    2023-07-06_15-27-29.jpg
  3. Each name generator has one or more Names, and each name has a set of Methods.

    • Names are the attributes that the name generator will generate. For this example, we'll have three: sAMAccountName, userPrincipalName, and cn.

    • Methods are sets of inputs & transformations for a given name. In many cases, only a single method is required per name. (Additional methods are used as fallbacks when collisions occur on names that have uniqueness constraints.)

  4. In the Names pane, click Add and enter ng_sAMAccountName as the name. We add the ng_ prefix to indicate that this variable was created in a name generator.

    2023-07-07_8-50-03.jpg
  5. In the Methods pane, click Add. A new method is created for the ng_sAMAccountName name.

  6. Drag and drop variables from the filter output in the Columns pane into the Parts of the new method. We'll add first_name to Part 1, last_name to Part 2, and employee_id to Part 3.

    2023-07-07_8-55-47.jpg
  7. Select a Part to apply Conversions to it.

    1. For this example, we'll apply two conversions to Part 1 (first_name): Case conversion: convert to lower case and Shorten: use first character.

      2023-10-13_10-37-57.jpg
    2. For Part 2, we'll also apply two conversions: the Case conversion: convert to lower case conversion and Add at begin with Argument (1) = ..

      2023-10-13_10-39-23.jpg
  8. Next, we'll create a userPrincipalName. Click Copy Name to copy the ng_sAMAccountName. Rename the copy ng_userPrincipalName.

    2023-07-07_10-18-31.jpg
    1. We'll keep the existing sAMAccountName method intact, and simply add an Add at end conversion to Part 3, with Argument (1) = @t4edemo.com.

      2023-07-07_10-20-28.jpg
  9. Finally, we'll create a cn. The cn will have a very different format than the sAMAccountName and userPrincipalName, so we'll click Add to create a brand new Name. We'll name it ng_cn, and add a method to it, with the same parts as before.

    2023-09-15_13-01-43.jpg
    1. We'll add an Add blank at end conversion to Part 1.

      2023-09-15_13-33-11.jpg
    2. We'll add an Add at end conversion to Part 2, with Argument (1) = .

      2023-09-15_13-33-54.jpg
    3. The ng_cn now has the format FirstName LastName - EmployeeID.

  10. Click Save.

Optional: Set uniqueness constraints

Since in this example we're using employee IDs in all of our Names, there shouldn't be any collisions. However, in a scenario where our name generation schemes could potentially generate collisions, we'd want to add additional Methods and/or Iterations to our Names, and set uniqueness constraints. If collisions occur, NIM will fall back to those additional methods and/or iterations.

Next: Step 6: Password generation