How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I exclude specific users from syncing during reconciliation in IDM (All versions)?

Last updated Apr 8, 2021

The purpose of this article is to provide information on excluding specific users from syncing during reconciliation in IDM using the validSource trigger. The validSource trigger applies to the entire mapping and cannot be used for specific actions such as onCreate.

Specifying users to sync

You can specify users to exclude from syncing during reconciliation by using the validSource trigger within the IDM mapping to evaluate whether the source account (for example, an LDAP account) is valid based on specific criteria. The criteria should be scripted in a way that returns a boolean value true or false. Only users who meet the conditions specified by the validSource trigger (boolean value returned = true) are synced.

You can implement the validSource trigger as follows:

  1. Add the validSource trigger in the sync.json file (located in the /path/to/idm/conf directory). You can either specify the condition to meet or the script to call. For example:
    • This validSource trigger sets a condition that excludes all employees whose employeeId attribute is set to null or blank: "validSource": {                "type": "text/javascript",                 "source": "source.employeeId != null && source.employeeId != ''"             }
    • This validSource trigger calls a script called filterusers.js"validSource": {                "type": "text/javascript",                 "file": "script/filterusers.js"             }If you have specified a script to call, you need to create the script with the same name in the directory specified.

See Also

How do I exclude specific users from syncing during LiveSync in IDM (All versions)?

Synchronization Guide › Filtering Source and Target Objects With Scripts

Synchronization Guide › Mapping Data Between Resources

Synchronization Guide › Synchronization Situations and Actions

Related Training

ForgeRock Identity Management Core Concepts (IDM-400)

Related Issue Tracker IDs


Copyright and Trademarks Copyright © 2021 ForgeRock, all rights reserved.