GroupID 8.x - Synchronize
We have a list of employees who are not with the company anymore and we would like to treat them as follows:
- Disable the accounts
- Move disabled accounts to a different container
- Clear their group memberships except for a specific group
- In GroupID Management Console, expand the Synchronize node, right-click All Jobs and select New Job.
- On the Select Source page of the New Job wizard, select the source file and click Next.
- On the Select Destination page, specify the destination, which is Active Directory in our case. Provide credentials to connect to the directory and click Next.
- On the Sync Object Options page, select the User check box for object type and the Skip operation since we are only updating the existing users and not creating new ones.
- On the Select Fields page, add the Employee ID and Disable Account fields to the Selected Fields box.
- The next and the most important page is the Field Map(s) page. You have to map the destination Employee ID field to the corresponding field in the source file. Moreover, for Disable Account you have to use Static transform with value set to “TRUE”.
- Now click Edit Global Script.
- On the Global Script Editor window, click Tools > Add/Remove Reference on the menu.
- On the Add Reference dialog box, click Browse to browse to the following location, where you have to select the file, Imanami.Synchronize.ActiveDirectoryTool.dll.
[GroupID installation drive]:\Program Files\Imanami\GroupID 8.0\Synchronize\PowerTools
- Now back in Global Script Editor, navigate to the DTM Row Finished section and add the following lines. Once done, it will appear somewhat like the image shown below.
ActiveDirectoryTool.AddToGroup("DN of the specific group to which you would like to retain the membership of ")
ActiveDirectoryTool.MoveObject ("LDAP://DN of the destination container to which you would like to move disabled users")
The code in the image will clear the group memberships of the disabled users, while retaining the membership of Group C and moving the disabled users to a container named Disabled Users.
- Now once again in Global Script Editor, click Build > Compile Script on the menu. Then save and close the editor.
- Complete the wizard to create the Synchronize job.
Now when you run this job, Synchronize will disable the user accounts for the Employee IDs mentioned in the source file, clear their group memberships except Group C, and move these disabled accounts to an existing container named Disabled Users.