Active Directory allows you to create simple or complex LDAP queries to retrieve the specific objects. AD Information Sync also supports the LDAP query.
In an AD Information Sync , profile, you can enter the common LDAP queries to filter the objects and sync them to the SharePoint list, such as all disabled user objects ((&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))) or all enabled user objects ((&(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))).
In this article, we will demonstrate how to enter a LDAP query in the AD Information Sync profile to retrieve the users whose job title is Assistant.
Specify LDAP query in sync profile to only sync users whose job title is Assistant.
2 users whose job title is Assistant are synced to the Assistants list from Active Directory.
And there are 7 users in the Active Directory, and two of them are Assistants as following.
Download the trial version of AD Information Sync and install it to your SharePoint server.
Navigate to the site in which the Assistants list is located.
In the upper right corner, click Settings and then click Site Settings.
On the Site Settings page, click AD Information Sync settings under BoostSolutions Software section in the bottom right corner of the page.
On the AD Information Sync Settings page, click Create Profile to create a new profile, specify a unique name for it.
In the List section, select the SharePoint list to which we will synchronize the information from Active Directory. Select Assistants from the dropdown list.
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.
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 Enter LDAP Query and type the following LDAP query in the textbox.
(&(objectCategory=user)(objectClass=user)(title=assistant))
In the Column Mapping section, map the AD attributes to the list columns as following.
Keep other settings as default and click OK to save the settings for the profile.
On the AD Information Sync Settings page, click Sync Now for the profile we created.
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.
Wait for a few seconds for the synchronization to be completed.
Navigate to the Assistants list and you will find that the 2 users whose job title is Assistant in the Active Directory have been synced to the SharePoint list as following.