question

DebmalyaPanday-2576 avatar image
0 Votes"
DebmalyaPanday-2576 asked MarceldeVries-2227 answered

Unable to move bulk users from Skype for business On-Premise to SfB Online

I am trying to move bulk users from SfB On-Premise to SfB-Online using Move-CsUser PowerShell Cmdlet. Below is the code snippet:

 $INP = Get-Content -Path <txt file path>
    
 $SESSION = New-CsOnlineSession
 Import-PsSession $SESSION -AllowClobber
    
 foreach($USER in $INP)
 {
 Move-CsUser -Identity $USER -Target 'sipfed.online.lync.com' -ProxyPool 'ProxyPool_FQDN' -UseOAuth -Confirm:$False
 }

It works fine for 15-20 users and moves them successfully to SfBOnline however, after that it prompts for Office admin credentials again saying "We couldn't sign you in. Please try again" and doesn't accept the credential anymore. Keeps prompting the same.

NOTE:
• I have followed almost all the possibilities from Technet with no luck.
• Disabled MFA from the global admin Office account - No luck.
• Tried using -UserList parameter to move bulk users - Same issue.

windows-server-powershelloffice-skype-business-server-administration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SharonZhao-MSFT avatar image
1 Vote"
SharonZhao-MSFT answered SharonZhao-MSFT commented

@DebmalyaPanday-2576,

Do you check if you could move users from Skype for Business on-premises to online properly in bulk in Skype for Business Control Panel?

Could this script work again when you rerun it?

If every time it can only work fine for 15-20 users, then shows error message, it must be related to your script itself. As we are mainly responsible for general issue of Skype for Business, your script related to development is not in our scope. So, it’s hard for us to provide effective help on script.

Meanwhile, I found a slightly different script to move users as below. You could modify some parts of your script and check if it could work.

 $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


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DebmalyaPanday-2576,
Do you have any further question on this topic now?
If the suggestion helps, please be free to mark it as an answer for helping more people.

0 Votes 0 ·

@DebmalyaPanday-2576,
Haven't received your update for a long time, any update now?
If the above suggestion helps, please be free to mark it as answer for helping more people.

0 Votes 0 ·

Hi,
I have the same problem as @DebmalyaPanday-2576 is describing.

He is using the scrip for more users at a time, to loop them with the cmdlet. You are having only one line. How you would do for more user at a time, like more than 100? I'm using the same cmdled as you are describing but with a loop and I'm having the same problem.

Thnaks

0 Votes 0 ·

@zolalex
The script I provided in my first reply is an alternative. You should modify it to apply the bulk moving.
As we are mainly responsible for general question of Skype for Business, script service is not supported by us. Thanks for your understanding.

0 Votes 0 ·
zolalex avatar image zolalex SharonZhao-MSFT ·

Hi @SharonZhao-MSFT , Yes, I understand what you are saying.
But the problem for me and for others is that we can't do users in bulk,, there is an error saying that "you can't sing-in", exactly how described in the post creation. Is like stoping after 20 users and then you need to wait for about 30 min and then you can do 20 more and again and again... that's not normal.90501-block-after-20-users.png


0 Votes 0 ·
Show more comments
MarceldeVries-2227 avatar image
0 Votes"
MarceldeVries-2227 answered

Same issue. The reason it happens is because the move-csuser cmdlet in Skype for Business server logs into AzureAD separately for each user move. I think AzureAD blocks the consequent sign ins after 15-20 times. After a couple minutes it works again, but it's a pain for really big moves. I use basically the same method as OP, see below. I don't know how to get the cmdlet to login only once to AzureAD. Anyone has a suggestion? Is it hard coded in the move-csuser cmdlet in SfB server?


$url="https://admin1e.online.lync.com/HostedMigration/hostedmigrationService.svc"
Import-Csv "C:\Users\user\Desktop\MigrateToTeams\siplist.csv" -Header Identity | Foreach-Object {Move-CsUser -Identity $_.identity -Target sipfed.online.lync.com -MoveToTeams -HostedMigrationOverrideUrl $url -useoauth -BypassAudioConferencingCheck -confirm:$false -verbose}

@SharonZhao-MSFT

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.