AD Connect objects deletion threshold – office 365

Hello Office 365 Admins,

Ahmad Yasin (MCSA office 365, MCSE : Messaging, Azure Certified)

while we are working in one project to Migrate exchange 2013 to office 365 (Exchange online), we started to sync the users to azure active directory using AD Connect tool, for some reasons unfortunately we synced around 3000 users to azure active directory by Mistake, so we tried to exclude the un-correct OU’s by do OU’s filtering in AD Connect and force the sync again in order to delete these objects from azure active directory, but again unfortunately these users still appear and have a synced status in Azure AD even we excluded it from the filtering.

so we decided to look to the event viewer logs in the AD Connect server, after reading the logs we found the below error appear in the logs as below:

Source : Directory Synchronization, Event ID:  906

Description: unable to process this synchronization cycle in azure active directory because the object deletion threshold was met or exceed

new error

So AD Connect have a threshold for deletion object to prevent accidental delete a bulk of objects by mistake, so it’s try to help you to prevent delete a large number of objects by mistake.

this threshold equal to 500 objects as stated in Microsoft articles, so by default you cannot delete 500 or more objects in one shot but if you have a case like me and you need to delete more than this number at same time you can simply disable this feature from azure AD PowerShell using below command:

Disable-ADSyncExportDeletionThreshold

error2

to learn how to connect to office 365 PowerShell, follow this link: https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx

 

after the deletion complete we recommend to re-enable this feature using PowerShell using below command:

Enable-ADSyncExportDeletionThreshold

that’s All 🙂

 

About Blogger …

 

Ahmad Yasin (MCSA office 365, MCSE : Messaging, Azure Certified)

Ahmad Yasin (MCSA office 365, MCSE : Messaging, Azure Certified)

Ahmad Yasin in a Microsoft Cloud Engineer and the Owner & publisher of AzureDummies blog. He also hold many certificates in office 365 and windows azure including Developing Microsoft Azure Solutions, Implementing Microsoft Azure Infrastructure Solutions and MCSA office 365.
Ahmad is currently working in Specialized Technical Services Company (STS).
Find Ahmad at Facebook and LinkedIn

 

 

 

 

 

2 Comments

  1. What happens if you accidentally change filter removing OUs? I have not found a way to undo this when I get the warning. I don’t want the deletes to actually process. I have enabled the ous I want to sync again, but it still says the number of deletions are over the threshold. There are ways to disable and enable the threshold to allow the deletions to occur. Is there a way to cancel these deletions?

Leave a Reply

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