I wanted to share this for my own reference, but wanted to share the love.
Have been having a challenge with people thinking I am talking cr@p, which make me smile. If I am wrong I will admit it.
When you setup DirSync, users from your onPrem AD are copied to the Office 365 Azure AD. Simple.
When you migrate (onboard) a mailbox to Office 365 the onPrem accounts change:
Now if you have a filter based on msExchRecipientTypeDetails you need to watch out, as expected the msExchRecipientTypeDetails changes:
This caused me some challenges as we had a filter that would only migrate disabled accounts with a value of 4 or 16 in msExchRecipientTypeDetails.
The net result was that after a Shared or Room mailbox was onboarded to o365 they would drop out of DirSync. This is okay, as they stay in the Azure AD as a deleted user for 30 days.
You can recover a user from deleted users, they appear in Azure AD as “In Cloud” and any mailbox they had is accessible.
This is the fun bit. If the recovered user is added back in to dirsync, dirsync uses the Azure AD ImmutableId and compares that to an OnPrem Guid. If a match they are become Dirsynced again.
Hope this helps someone, it helped me, get an understanding of what the hell was going on!
If this is complete cr@p let me know please!