I often hear customers who run an onpremises Exchange 2010 or 2013 environment in Hybrid mode with Office 365 complain about their Shared Mailboxes not appearing in Office 365 when using AADSync (or AADConnect).
This is important for mail routing if they don’t exist as contacts, or if you are using Exchange Online Protection for these mailboxes.
So, two quick steps to configure AADSync to also sync disabled users to Office 365.
1. Open the Synchronization Rules Editor on the aadsync server and edit the inbound rule called User AccountEnabled
2. Change the scoping filter of this rule to ISNOTNULL instead of a bit operator
Voila, your disabled useraccounts will now properly sync to Microsoft Office 365.
But by default disabled accounts are synched to Azure AD using the default provision synch rule
How to install synchronization rule editor?