Move-CsUser Error: Object Reference Not Set To An Instance Of An Object

During a recent migration, I encountered the following error when attempting to migrate users from Skype for Business Server on Premises, to Microsoft Teams in Office 365:

Object Reference Not Set To an Instance Of An Object

This issue was being caused by an issue with authentication. Essentially, when you run the move-csuser command, you should see a pop-up asking you to authenticate with Office 365 as an Administrator.

In this case, a proxy server was causing issues with blocking this traffic, which was generating the above error.


Two things helped resolve this issue. The first is to ensure you run a proxy connection string prior to running the Move-CSUser command in PowerShell:

#proxy settings for powershell
[]::defaultwebproxy = new-object'http://your-proxy-here:8080')
[]::defaultwebproxy.credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
[]::defaultwebproxy.BypassProxyOnLocal = $true

#Setting TLS1.2
[Net.ServicePointManager]::SecurityProtocol =

The second is to use the -UseLegacyMode parameter for your move command:

$url = ""
move-csuser -identity -target "" -hostedmigrationoverrideurl $url -verbose -BypassAudioConferencingCheck -BypassEnterpriseVoiceCheck -UseLegacyMode

I also included Bypass parameters above that skip checking for Audio Conferencing and Enterprise Voice details – useful if you don’t have these enabled within your org.

The UseLegacyMode parameter was added recently to the newer Powershell Cmdlets. You can install these by installing the latest CU Update for Skype for business server (core components – At least August 2021), and installing the latest MicrosoftTeams Powershell Module (Install-MicrosoftTeams -AllowClobber -Force)


0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments