I have been doing a lot of On-Premises Exchange to Office 365 migrations lately and each time I find new issues that can be very time consuming to research and resolve.
One issue I’ve had is when creating a new migration batch the mailbox I want to migrate is not listed.
The issue seems to be with Azure AD Connect synchronization and the on-premises Active Directory. If the account/user/mailbox has issues the replication to Azure AD gets horribly malformed.
Step 1 – remove the user from MS Online
Open PowerShell (elevated privileges) and connect to Msol-Services
Install-Module MSOnline
Connect-MsolService -Credential $Credential
Provide the tenant Global Admin credentials
At this point you might as well also load up AzureAD
Install-Module AzureAD -force
Set-ExecutionPolicy RemoteSigned
$Session = NewPSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Credential -Authentication Basic -AllowRedirection
$Import-PSSession $Session
At this point your powershell has two sessions – one for AzureAD and one for MSOnline Services (Exchange Online)