How to Delete a Directory from AAD Connect

Thursday, April 2, 2020
You can use Azure Active Directory Connect (AADC) to synchronize one or more on-premises Active Directories to Azure Active Directory. Once additional directories are added to AADC, it may not be obvious how to remove a directory. Here's how to do it.

First, let's look at our example which syncs two directories, and to the same AAD tenant.

Here's what it looks like from the View current configuration option in AADC:

And here's what it looks like from Customize synchronization options in AADC. Notice that you can only add directories, not remove them.

In this example, I want to remove the directory from AADC so it will no longer sync to Azure AD. Before we can remove the directory we need to disable the AADC sync scheduler. Run the following PowerShell cmdlet:
Set-ADSyncScheduler -SyncCycleEnabled $false
Next, open the AADC Synchronization Service Manager located at C:\Program Files\Microsoft Azure AD Sync\UIShell\miisclient.exe. This tool is useful to see the synchronization process and confirm that syncs are happening error-free.

Click the Connectors button at the top and you will see the directories that are currently configured to sync.

Select the directory you want to remove and click Delete. I'm deleting the directory.

Select Delete Connector and connector space and click OK. Click Yes on the following prompt to delete the directory from AADC and Azure AD:

It will take a few seconds to delete the directory objects from Azure AD and the AADC metabase.

After the directory has been removed from AADC, re-enable the AADC sync scheduler and perform a delta sync using PowerShell:
Set-ADSyncScheduler -SyncCycleEnabled $true
Click the Operations button at the top and you will see that the directory is no longer listed in the sync cycles.

 The directory is now removed from the AADC configuration.

No comments:

Post a Comment

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.