Step 10: Add a mapping to update AD accounts (tutorial)
As the last step in the basic tutorial, we'll configure an AD user update mapping.
Modify the source data
- Outside of NIM, we'll copy the employees.txt file from our HR500 system, and open it in a text editor.
- We'll modify a few names and save the file. | Row # | Old First Name | New First Name | | --- | --- | --- | | 2 | Eleanor | Ellie | | 4 | Patrick | Pat | | 5 | Bobby | Bob | | 6 | Marlene | Marly | | 8 | Anna | Ann |
- We'll copy and paste the updated file over the old one, in the Path that our HR500 system files are located in (configured in Step 1).
Copy our previous filter
- Go to Processing > Filters.
- For the HR500_AD_User_Create filter we created previously, click Copy Filter. A copy is created, named HR500_AD_User_Create_01 :
- For the filter copy, click Rename Filter. Name it HR500_AD_User_Update .
- Click Change.
Configure the filter's logic
- For the now-renamed HR500_AD_User_Update filter, click Edit Filter.
- We'll change the no logical operator to any. This is because we're now looking for employees that do have AD accounts.
- When we click Filter, this is confirmed: all 585 employees are returned.
- We'll also go to the Columns Selection tab and enable all columns under the Users alias. Whereas these columns were always blank and therefore irrelevant in the HR500_AD_User_Create filter, they will be non-empty in this filter.
- Click Save. ### Tip For an update mapping, we don't need to do any of the logic checks in the filter. The update mapping itself will handle this.
Add the user update mapping
- Go to Output > Mappings.
- Click Add.
- Enter the following values: - System: AD - Target: Users - Function: UserUpdate - Name: HR500_AD_UserUpdate
- Click Save.
Configure the mapping
- For the mapping's Filter, select HR500_AD_User_Update . Its columns are populated into the Items pane.
- In the Items pane, click the > button to preview the first record.
- For this example, we'll only map the following attributes: | Attribute | Item | Note | | --- | --- | --- | | givenName | first_name | | | objectGUID | objectGUID | Required. |
- Click Save.
Collect data
- We'll go back to Systems > Overview and click Collect for both our systems.
Preview the mapping
- If we edit our HR500_AD_UserUpdate mapping and go to its Run tab, the five names we changed in the CSV source data are now queued.
- We'll select one of the rows in the Operation pane and click Run Selected Item. ### Tip Double-click a bolded cell to see more details about it.
- This user's first name has been updated in AD.
Update the HR500_AD job
- Go to Output > Jobs.
- For the HR500_AD job, click Edit Job.
- Go to the Configuration tab.
- Click Add.
- For this job item, we'll select a type of crud, and for the Name, we'll select the HR500_AD_UserUpdate mapping. We'll set the Threshold to
1000. - Click Save.
Run the job from the schedule
- As a final step, we'll go back to Scheduler > Overview and click Manual Run for the HR500 schedule.
- Four updates are found and written into AD (the five changes we made, minus the one that we already test ran).