Skip to main content

Bulk Update Active Directory

You can use Data Sync to apply large updates or additions to your Active Directory records with a few easy steps.

You may need to change the enabled or disabled status of a large quantity of users, or you might have added a new metadata column for all users stored within a SharePoint list and this needs to be applied to each Active Directory record. With Data Sync you simple connect, map, compare and sync, and your changes will be applied.

Below we discuss setting up a project to add 900+ new users, and update 67 records with an additional column of data and an account status change.

Contents

Requirements

Before you get started there are a few requirements:

  • Windows 10 or Windows Server
  • Downloaded & Installed Data Synchronisation Studio
  • Access to Active Directory
  • A data set containing the records you want to add

Connect to your Source and Target

To get started open Data Sync and connect to your source data, you can connect using any of the inbuilt connectors or build your own using the Empty Datasource Connector or the JSON API Designer.

Once you are connected to your source data, you then need to connect the target window to Active Directory.

The default attribute to select in the connection will depend on the data you want to add. In this example we are adding to user records but you can change this as you need to (e.g computers, contacts or groups) and each type will follow the same process.

To connect to the user records in Active Directory we need to click onto Connect Datasource in the target window, then expand the Active Directory folder and select Active Directory V2 - Users/Contacts/Groups/Computers.

By default Users will be selected from the DefaultAttributes drop-down list, leave this as it is, then enter in the LDAP path to your Active Directory instance and enter in any credentials you need to access AD.

You can enter in the full LDAP path (including the server name) or just the server name.
If you just use the server name your path would look similar to: LDAP://dc01.
Otherwise an example path connecting to a specific OU could be: LDAP://dc01/OU=Test,DC=demo,DC=simego,DC=com.

We have more details on finding the LDAP Path in our guide here

AD Connection Details

To finish click Connect & Create Library Connection to save the connection to the connection library. Then enter in a name for the connection and click OK. If you refresh the connection window your Active Directory connection will now be visible in the list.

You only need to save the connection once per OU, as you will be able to access other objects such as Groups and Contacts from the connection window.

If you have already saved your connection to AD you can select the Users object from your AD connection. To do this right click onto Users object and select Connect to Target (B) or drag the object onto the target window.

Connection Library - Active Directory Users

Mapping

The next step is to map the columns you want to update and make sure to add a key column that can be used to identify each user. For users we recommend using either the SAMAccountName or the Email Address as these will always be unique. Note that you can always use calculated columns to concatenate fields together to make the SAMAccountName if it is not already in your source.

Now add the source columns to the schema map and match them to their corresponding Active Directory attribute. The image below shows an example of what this might look like.

Mapping

Preview the Results and Sync

Now we need to run the compare to preview the results before synchronising. To do this click onto the Run Compare button in the toolbar, and then select a row to view either the adds, updates or deletes.

info

Deletes are disabled by default but will still show in the results if the records do not exist in the source data set. To enable deletes set EnableDelete to True in the target connection properties.

In this example we have 933 records to add to the target and 67 records to update. Below you can see that the update actions are highlighted in yellow.

Preview Results

Make sure to take a quick glance through to ensure the data looks right and then click Synchronise and Start to begin the sync.

Synchronise

Your Active Directory records will then be added and updated where necessary.

Make sure to save your project in-case you need to use it again in the future. You can always modify it to include more columns if that is needed the next time it is run.