In this environment, the on premise Active Directory DNS name is different from the email address public DNS name. An alternate UPN Suffix that matches the public email address DNS name has already been configured for the on premise AD environment for the purpose of facilitating the Office 365 onboarding process. The first step in this process is to update the UserPrincipalName attribute for this batch of AD users. My On Premise AD DNS name is “myadlab.com”. The public DNS name is “myadpublicdns.com”:

1) Update Users’ UserPrincipalName attribute :
I’ll start by verifying the Organizational Unit name for the group I plan to migrate:

2) Run the .\DirectorySyncClientCmd.exe command on the Azure AD Connect Synchronization server to manually update the UserPrincipalName attribute of the users in Office 365 Azure AD:

The next screen shot shows the Connector Space Object Properties, which confirms that the UserPrincipalName property was modified for the user:

3) Create a csv file of the users based on the required format for Office 365 Batch migrations. The UserPrincipalName value for the users also matches the external email address. A screen shot of the csv file follows:

The IsLicensed property indicates that no licenses for O365 Enterprise or any other has been assigned to the users. The MSExchRecipientTypeDetails property value of 1 indicates that the user mailbox has not been migrated to Office 365 and still resides on the on premise Exchange Server.

There are scenarios where it becomes necessary to move a mailbox back to the on premise mailbox server from Office 365 cloud using the GUI (web interface). The offboarding process is straight forward . The following snapshot shows the key field values that need to be entered while moving a mailbox back on premise.