Generate Active Directory account names
Provisioning tutorial · Step 5 of 10
Create consistent account identifiers for new users.
Create the three account names that the AD mapping needs: sAMAccountName, userPrincipalName, and cn.
Add the name generator
-
Go to Processing > Name Generation.
-
Click Add.
-
Name the generator
ng_AD. Theng_prefix makes generated values easy to identify. -
Click Create.
Configure the name generator
-
Select HR500_AD_User_Create in Based On Filter. Its output becomes available in Columns.
-
In the Columns pane, click the > button to preview the first record from the filter.
-
A Name is an output attribute; a Method defines its inputs and transformations. Create
ng_sAMAccountNamein Names. -
In the Methods pane, click Add. A new method is created for the
ng_sAMAccountNamename. -
Drag
first_name,last_name, andemployee_idinto Parts 1–3 respectively. -
Format the name as follows:
- Part 1 / first_name: lowercase and shorten to the first character.
- Part 2 / last_name: lowercase and add
.at the beginning.
The result resembles
j.smith12345. -
Copy
ng_sAMAccountName, rename the copyng_userPrincipalName, and add@t4edemo.comto the end of Part 3. Replace this example domain with your own. -
Add a new name named
ng_cn, using the same three parts. Add a blank space to the end of Part 1 and-to the end of Part 2. The result isFirstName LastName - EmployeeID. -
Click Save.
Optional: Set uniqueness constraints
Because each example name includes an employee ID, collisions are unlikely. If your format can duplicate a name, add fallback methods or iterations and configure uniqueness constraints so NIM can try the next available format.