Answered by:
Migrate a SFB user

Question
-
I am using hybrid environment i am using SFB2015, i want to migrate a user from onprem to online,
my onprem account is user1-onprem@domain1.com
my online account is xyz1-cloud@domain2.mail.onmicrosoft.com i.e routing address is : xyz1-cloud@domain2.mail.onmicrosoft.com
I belive with the below syntax i can move the user from onprem to online
Get-CsUser -Identity sip:onpremuser@domain1.com | Move-CsUser -Target sipfed.online.lync.com -Credential $creds
What privileges do my cloud account or onprem account should have to migrate the user.
Where do i need to give the privileges, should be it in onprem or online.
Which account do i need to assign privileges.Tuesday, March 12, 2019 1:06 AM
Answers
-
Hi,
Please use the following cmdlet to have a try:
$cred=Get-Credential
$url="https://admin1a.online.lync.com/HostedMigration/hostedmigrationService.svc"
Move-CsUser -Identity username@contoso.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl $url
Note: The highlighted "Hosted Migration Override URL" is variant, please see the following requirement.
Besides, to move users from an on-premises environment to Skype for Business Online, you could use two methods, either the Move-CsUser cmdlet or the Skype for Business Server Control Panel.
If you like, please sign in SFB control panel with on premise Admin credential to have a try when moving the users.
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
- Edited by Calvin-Liu Monday, March 18, 2019 9:06 AM
- Marked as answer by Glenn Maxwell Sunday, December 29, 2019 6:02 PM
Monday, March 18, 2019 9:06 AM -
Hi,
Seems the Office 365 Admin account is not the right one for sign in.
Would you please check the procedures set up for the hybrid?
Generally, the Office 365 Admin account is necessary to be used during the deployment process, see the fourth step "Specify the authentication information" in this article: https://blogs.technet.microsoft.com/canitpro/2015/12/23/step-by-step-skype-for-business-2015-hybrid-configuration/
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
- Proposed as answer by Calvin-Liu Wednesday, April 3, 2019 10:01 AM
- Marked as answer by Glenn Maxwell Sunday, December 29, 2019 6:02 PM
Wednesday, March 20, 2019 7:40 AM
All replies
-
-
In the on-premises environment, the user performing the move must have the CSServerAdminstrator role in Skype for Business Server.
-
In Office 365, the user performing the move must either be a Global Administrator or it must have both Skype for Business Administrator and User Administrator roles.
Check here:
https://docs.microsoft.com/en-us/skypeforbusiness/hybrid/move-users-between-on-premises-and-cloud
Command:
$cred=Get-Credential
$url="https://admin1a.online.lync.com/HostedMigration/hostedmigrationService.svc"
Move-CsUser -Identity username@contoso.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl $url
“Vote As Helpful” and/or “Mark As Answered” - MCSA - MCSE - http://www.ucsteps.com/
- Edited by Thiago Mendes da Silva Tuesday, March 12, 2019 2:06 AM
- Proposed as answer by Calvin-Liu Wednesday, March 13, 2019 7:59 AM
Tuesday, March 12, 2019 2:05 AM -
-
Hi,
Agree with Thiago.
Please make sure the account that you are using to perform the Move-CsUser cmdlet have been added CSAdministrator Property.
Here you could find more details on the required Admin credentials that for moving users between on premise and online:
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
- Proposed as answer by Calvin-Liu Wednesday, March 13, 2019 7:59 AM
Tuesday, March 12, 2019 9:00 AM -
Hi,
Are there any update for this issue? If the reply is helpful to you, please try to mark it as an answer, this will make answer searching in the forum easier and be beneficial to other community members as well. :)
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
Wednesday, March 13, 2019 7:59 AM -
i have added my onprem account(user1-onprem) to CSAdministrator group.
After that i have logged into SFB Online Shell using my cloud account xyz1-cloud .MFA is enabled for my cloud account and it is a global admin
PS C:\WINDOWS\system32> Get-CsUser -Identity sip:clouduser@mydomain.com | Move-CsUser -Target sipfed.online.lync.com
-Credential $creds
Get-CsUser : The term 'Get-CsUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-CsUser -Identity sip:clouduser@mydomain.com | Move-CsUser -Ta ...
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-CsUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
=====================================================
Even i have tried on SFB onprem Management shell
Get-CsUser -Identity sip:clouduser@mydomain.com | Move-CsUser -Target sipfed.online.lync.com -Credential $creds
Confirm
Move-CsUser
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):A
Move-CsUser : Failed to logon with given credentials. Make sure correct user
name and password provided.
At line:1 char:55
+ Get-CsUser -Identity sip:clouduser@mydomain.com | Move-CsUser -Target
sipfed ...
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (CN=clouduser@mydomain.com) [Move-CsUser], CommonAuthException
+ FullyQualifiedErrorId : MoveError,Microsoft.Rtc.Management.AD.Cmdlets.Mo
veOcsUserCmdletThursday, March 14, 2019 4:36 PM -
Hi,
Please use the following cmdlet to have a try:
$cred=Get-Credential
$url="https://admin1a.online.lync.com/HostedMigration/hostedmigrationService.svc"
Move-CsUser -Identity username@contoso.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl $url
Note: The highlighted "Hosted Migration Override URL" is variant, please see the following requirement.
Besides, to move users from an on-premises environment to Skype for Business Online, you could use two methods, either the Move-CsUser cmdlet or the Skype for Business Server Control Panel.
If you like, please sign in SFB control panel with on premise Admin credential to have a try when moving the users.
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
- Edited by Calvin-Liu Monday, March 18, 2019 9:06 AM
- Marked as answer by Glenn Maxwell Sunday, December 29, 2019 6:02 PM
Monday, March 18, 2019 9:06 AM -
MFA is enabled for my global admin account on cloud
i have used the below two syntaxes but i am not able to
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\WINDOWS\system32> $cred=Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\WINDOWS\system32> $url="https://admin1a.online.lync.com/HostedMigration/hostedmigrationService.svc"
PS C:\WINDOWS\system32> Move-CsUser -Identity onpremuser@contoso.com -Target sipfed.online.lync.com -Credential $cre
d -HostedMigrationOverrideUrl $url
Move-CsUser : The term 'Move-CsUser' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Move-CsUser -Identity onpremuser@contoso.com -Target sipfed.onlin ...
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Move-CsUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
=================================================================
PS C:\WINDOWS\system32> Import-Module $((Get-ChildItem -Path $($env:USERPROFILE+"\Documents\WindowsPowerShell\Modules\") -Filter SkypeOnlineConnector -Recurse ).FullName|?{$_ -notmatch "_none_"}|select -First 1) -verbose
PS C:\WINDOWS\system32> $cssession = New-CsOnlineSession –Credential $cred –OverrideAdminDomain "mydomain.onmicrosoft.com"
PS C:\WINDOWS\system32> Import-PSSession $cssession
PS C:\WINDOWS\system32> Move-CsUser -Identity onpremuser@contoso.com -Target sipfed.online.lync.com -Credential $cred -HostedMigrationOverrideUrl $url
Move-CsUser : The term 'Move-CsUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ Move-CsUser -Identity onpremuser@contoso.com -Target sipfed.onlin ...
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Move-CsUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException====================================
i have even tried from GUI, but i belive since MFA is enabled i am not able to login
Tuesday, March 19, 2019 4:06 AM -
Hi,
Seems the Office 365 Admin account is not the right one for sign in.
Would you please check the procedures set up for the hybrid?
Generally, the Office 365 Admin account is necessary to be used during the deployment process, see the fourth step "Specify the authentication information" in this article: https://blogs.technet.microsoft.com/canitpro/2015/12/23/step-by-step-skype-for-business-2015-hybrid-configuration/
Kind regards,
Calvin Liu
Please remember to mark the reply as an answer if you find it is helpful. It will assist others who has similar issue. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.
Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
- Proposed as answer by Calvin-Liu Wednesday, April 3, 2019 10:01 AM
- Marked as answer by Glenn Maxwell Sunday, December 29, 2019 6:02 PM
Wednesday, March 20, 2019 7:40 AM