This can be set within Synchronization Rules Editor.
This is not supported if you have performed a directory synchronization using DirSync.
It is supported if performing a directory synchronization using AAD Sync, or AAD Connect.
For more details on the correct order of steps to follow for directory synchronization, refer to KB004336.
Run the Synchronization Rules Editor as an administrator.
Click In from AD – User Exchange to edit the Inbound Rule Type.
Select Transformations. Find the msExchMailboxGuid attribute.
Change it to the following:
Expression - msExchMailboxGuid - NULL - Checkmark Apply Once - Click Update.
Enable AADSync or AAD Connect and perform a full synchronization.
Now users may be assigned an Exchange Online license, and MigrationWiz may be used to migrate their mailboxes to Office 365.