Skip to main content

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

  1. Go to Processing > Name Generation.

  2. Click Add.

  3. Name the generator ng_AD. The ng_ prefix makes generated values easy to identify.

  4. Click Create.

Configure the name generator

  1. Select HR500_AD_User_Create in Based On Filter. Its output becomes available in Columns.

  2. In the Columns pane, click the > button to preview the first record from the filter.

  3. A Name is an output attribute; a Method defines its inputs and transformations. Create ng_sAMAccountName in Names.

  4. In the Methods pane, click Add. A new method is created for the ng_sAMAccountName name.

  5. Drag first_name, last_name, and employee_id into Parts 1–3 respectively.

  6. 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.

  7. Copy ng_sAMAccountName, rename the copy ng_userPrincipalName, and add @t4edemo.com to the end of Part 3. Replace this example domain with your own.

  8. 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 is FirstName LastName - EmployeeID.

  9. 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.