For some reasons, users in Active Directory might be disabled, for example, the most common reason would be the user (the employee) has left the company. Is it possible to export all disabled users from Active Directory to a SharePoint list? The answer is definitely yes.
In this article, we will demonstrate how to use AD Information Sync to export disabled users in Active Directory to a SharePoint list.
The three disabled users are exported to the Disabled Users list from Active Directory
And there are three disabled users in the Active Directory as following.
Download the trial version of AD Information Sync and install it to your SharePoint server.
Navigate to the site in which the Disabled Users 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 Disabled Users 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.
Check the checkbox of Enable Query 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=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))
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 Disabled Users list and you will find that those three disabled users in the Active Directory have been exported to the SharePoint list as following.