We were recently performing a Skype for Business 2015 to Microsoft Teams migration with Direct Routing for one our customers. As you may be aware, a migration of this kind requires a hybrid configuration between the on-premises Skype for Business environment and Microsoft Teams. Whilst the initiation of the hybrid process went correctly, when attempting to move users to Microsoft Teams we experienced an error. On initiation of the required Move-CsUser command from PowerShell, we were experiencing the following error:
Error=(201), Description=(Cannot find user in Active Directory with the following SIP URI: “sip:email@example.com”
This is quite a well documented issue in the world of the Skype for Business to Teams hybrid. Traditionally this is a case of the required Active Directory attributes not being synchronised from on-premises Active Directory to Azure AD. In our case, we had all the attributes synchronised we’d confirmed this by connecting to Azure AD via PowerShell and running a Get-ADUser command. Much of the documentation in reference to moving users to Microsoft Teams via PowerShell references the Hosted Migration Service URL, or in fact doesn’t reference this URL at all. In Microsoft’s official documentation for moving users from on-premises to the cloud (Teams), they detail the following commands should be executed.
Move-CsUser -Identity firstname.lastname@example.org -Target sipfed.online.lync.com -MoveToTeams -Credential $cred -HostedMigrationOverrideUrl $url
The key issue with the above is the Hosted Migration Service URL, it references https://admin1a.online.lync.com. This URL however is Office 365 tenant dependant. In a completely separate piece of Microsoft documentation, we found the following clue:
The value of the hosted migration override URL is a variant of the following URL: https://adminXX.online.lync.com/HostedMigration/hostedmigrationService.svc
In the above URL, replace the XX with either two or three characters.
The correct admin URL for your tenant can be located by running the following commands from a Windows PowerShell session connected to Office 365 with the Skype for Business commands imported.
- Run Get-CsTenant|ft identity and press enter.
- This will provide an output similar to the following: OU=(GUID),OU=OCS Tenants,DC=lyncXX001,DC=local
- In this output, it is the “DC=lyncXX001” element that is important, the two characters you see after the word “lync” are the characters you need to make a note of.
For example in our case, we had DC=lync1e001. In this case our Hosted Migration Server URL would form the following: https://admin1e.online.lync.com/HostedMigration/hostedmigrationService.svc. Low and behold when running the Move-CsUser command with the adjusted Hosted Migration Service URL, our “Error 201 Cannot find user in Active Directory with the following SIP URI” warning had now cleared.
That’s it, we hope this helps resolve your “Error 201 Cannot find user in Active Directory with the following SIP URI” issue and allows you to move your users from Skype for Business to Microsoft Teams. If you’re still having issues, check out our support services or use the contact form below to get in touch.