Knowledge Base

How to sync specific users from Active Directory to a SharePoint list using query filter?

Active Directory stores so many user objects, AD Information Sync enables you to sync all users’ information to the SharePoint list. But sometimes, you may just want to filter some specific users and sync them to the SharePoint list, such as sync the users whose job title is Manager.

In this article, we will demonstrate how to configure a filter query in the AD Information Sync profile.

WHAT YOU'LL GET

Specify query filter in sync profile to only sync users whose job title is Manager.

Three users whose job title is Manager are synced to the Managers list.

WHAT YOU'LL NEED

The sample data we use for this case

And there are 7 users in the Active Directory, and three of them are Managers as following.

Sync specific users from Active Directory to a SharePoint list using query filter

  1. Download the trial version of AD Information Sync and install it to your SharePoint server.

  2. Navigate to the site in which the Managers list is located.

  3. In the upper right corner, click Settings and then click Site Settings.

  4. On the Site Settings page, click AD Information Sync settings under BoostSolutions Software section in the bottom right corner of the page.

  5. On the AD Information Sync Settings page, click Create Profile to create a new profile, specify a unique name for it.

  6. In the List section, select the SharePoint list to which we will synchronize the information from Active Directory. Select Managers from the dropdown list.

  7. In the Active Directory section, specify a domain server and user credentials to connect to the domain server (Ensure the user account you specify has the appropriate permissions to access the domain server). Then click Connect. If everything goes right, it will show Connection attempt successful under the Connect button. If things went wrong, please check the user account you specified, make sure it has the permissions required.

  8. In the Filter section, specify the information you want to synchronize. Specify the object type as User.

    Select the Enable Query option to further filter items; then the configure panel will appear below, select Custom Search.

    In the first column, select an Active Directory attribute from the drop-down list, here we select the Job Title.

    In the second column, select an operator, here we select Is (exactly).

    In the third column, specify a value, here we typed Manager.

  9. In the Column Mapping section, map the AD attributes to the list columns as following.

  10. Keep other settings as default and click OK to save the settings for the profile.

  11. On the AD Information Sync Settings page, click Sync Now for the profile we created.

  12. A confirmation message will appear to remind you that the synchronization will modify data in Active Directory or the SharePoint list of this profile. Click OK to start the synchronization.

  13. Wait for a few seconds for the synchronization to be completed. Navigate to the Managers list and you will find that those three users whose job title is Manager in the Active Directory have been synced to the SharePoint list as following.

Login