Remove a Domain from Azure AD Connect Sync

In today’s post, I would like to explain how to properly remove a domain from the Azure AD Connect synchronization process without causing errors, such as the missing-partition-for-run-step error. Specifically, we’ll discuss removing contoso.com from the sync process in Azure AD Connect.

Steps to Remove a Domain from Azure AD Connect Sync:

Backup Configuration:
Before making any changes, ensure you have a backup of your current Azure AD Connect configuration:

Start-ADSyncExportConnectorConfiguration -Path "C:\backup\ADSyncConfig.json"

Modify Sync Rules:
Open the Synchronization Rules Editor to identify and modify any rules referencing contoso.com. Disabling these rules will prevent synchronization errors and ensure that no objects from this domain are processed further.

Unselect Domain from Sync:
In the Azure AD Connect Wizard, select Customize synchronization options and uncheck contoso.com from the Domain and OU filtering section. This excludes the domain from further syncs.

Remove Directory Partition:
Next, open the Azure AD Connect Synchronization Service Manager. Under Connectors, right-click your Active Directory connector, choose Properties, and uncheck contoso.com under the Configure Directory Partitions tab. This will stop the sync for that domain.

Refresh Schema:
After removing the domain, refresh the directory schema in the Azure AD Connect Wizard to update your environment properly.

Run Full Sync:
To finalize the process, initiate a full sync cycle using PowerShell:

Start-ADSyncSyncCycle -PolicyType Initial

Helpful Links:

For more detailed instructions on how to configure filtering and modify synchronization rules, you can visit the following Microsoft documentation:

By following these steps, you can successfully remove contoso.com from Azure AD Connect without triggering sync errors.

Junaid Ahmed
Junaid Ahmed

Junaid Ahmed is an enthusiastic Cybersecurity Manager and Azure Architect with a strong focus on cloud security, identity management, and passwordless adoption. He is passionate about helping organizations simplify their security approach, strengthen trust in the cloud, and embrace innovative technologies that drive both resilience and growth.

Articles: 35

Leave a Reply

Your email address will not be published. Required fields are marked *