Problem was that a single user was not syncing with Azure AD.
In Azure AD the user attribute On-premises sync enabled was “blank”.
Normally this setting is set to True.
In my case this was because the on prem value of msExchRecipientTypeDetails was wrong.
To change this, go to on premises AD and use the attribute editor to ensure the msExchRecipientTypeDetails is set to 2147483648.
Setting in OnPrem AD was :
Needs te be :
To speed up the sync to Azure AD you may use these power shells :
# Force sync of your domain repadmin /syncall /AdeP # Force sync to Azure AD. Run this on your AAD connect server start-ADSyncSyncCycle -PolicyType INitial
More information about attributes :