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
- Go to Processing > Name Generation.
- Click Add.
- 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 withng_helps differentiate them throughout the NIM interface. - Click Create.
Configure the name generator
- 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.
- In the Columns pane, click the > button to preview the first record from the filter.
- 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.)
- In the Names pane, click Add and enter
ng_sAMAccountNameas the name. We add theng_prefix to indicate that this variable was created in a name generator. - In the Methods pane, click Add. A new method is created for the
ng_sAMAccountNamename. - 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.
- Select a Part to apply Conversions to it.
- For this example, we'll apply two conversions to Part 1 (first_name): Case conversion: convert to lower case and Shorten: use first character.
- For Part 2, we'll also apply two conversions: the Case conversion: convert to lower case conversion and Add at begin with Argument (1) =
.. - Next, we'll create a userPrincipalName. Click Copy Name to copy the
ng_sAMAccountName. Rename the copyng_userPrincipalName. - We'll keep the existing sAMAccountName method intact, and simply add an Add at end conversion to Part 3, with Argument (1) =
@t4edemo.com. - 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. - We'll add an Add blank at end conversion to Part 1.
- We'll add an Add at end conversion to Part 2, with Argument (1) =
-. - The
ng_cnnow has the formatFirstName LastName - EmployeeID. - 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.