Sharepoint Migration Tool Powershell permissions error

Stefanos Evangelou 116 Reputation points
2020-10-08T07:51:39.26+00:00

Hello,

I am using instructions from https://learn.microsoft.com/en-us/sharepointmigration/overview-spmt-ps-cmdlets to build a script which will be migrating on-prem file server data to Sharepoint Online sites. I am using a .csv file for a bulk migration of 10 SMB shares. When running the Start-SPMTMigration -ParametersValidationOnly cmdlet I am getting following error:
Username or password for target site https://sitename is not correct.

Before running the Start-SPMTMigration cmdlet, i ran Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force, where $Global:SPOCredential is the credential object of the site collection administrator user with full permissions to the target site. I have double checked that credentials are correct.

I have not been able to find any other documentation or forum post regarding the above error in a file server migration scenario. Looking at the SPMT tool log I can see the same error having being recorded.

Any ideas on why this is happening and how it can be fixed?

Microsoft 365 and Office | SharePoint | For business | Windows
{count} vote

2 answers

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,806 Reputation points
    2020-10-09T06:48:21.323+00:00

    Hi @Stefanos Evangelou ,

    Per my understanding, here is a checklist for you:

    1. Check whether the SharePoint version and the system requirements meet demands in the reference:
      https://learn.microsoft.com/en-us/sharepointmigration/overview-spmt-ps-cmdlets
    2. Would you like to share the script? It will help us troubleshoot more accurately. The new PowerShell cmdlets support three different types of migration tasks, you can test with another type of task and see if it works.
    3. If you have confirmed that the permission is fine, please check if there are any other error messages in the Tool Log. If yes, here is a simple reference for troubleshooting:
      https://learn.microsoft.com/en-us/sharepointmigration/troubleshooting-common-spmt-issues
      Best Regards
      Elsie Lu

    If the answer 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.

    0 comments No comments

  2. Stefanos Evangelou 116 Reputation points
    2020-10-19T11:13:05.94+00:00

    My PS script goes like this:

    Import-Module Microsoft.SharePoint.MigrationTool.PowerShell
    $adminUPN = "mySPOadminUPN"
    $orgName = "myOrgName"
    $webUrl = "https://$orgName.sharepoint.com/"
    $Global:SPOUrl = $webUrl
    $Global:UserName = $adminUPN
    $Global:SPOPassword = Read-Host "Your SPO password"
    $Global:PassWord = ConvertTo-SecureString -String $Global:SPOPassword -AsPlainText -Force
    $Global:SPOCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Global:UserName, $Global:PassWord
    Register-SPMTMigration -SPOCredential $Global:SPOCredential -Force
    $csvItems = import-csv "C:\SPMT.csv" -Header c1,c2,c3,c4,c5,c6
    ForEach ($item in $csvItems) {Write-Host $item.c1; Add-SPMTTask -FileShareSource $item.c1 -TargetSiteUrl $item.c4 -TargetList $item.c5 }

    Start-SPMTMigration

    I just realized that the SPO admin user has MFA enabled on it.
    Do the above Powershell cmdlets of the SharePoint Migration Tool (SPMT) migration engine support MFA logins? If yes, how can I include MFA authentication in the script? The only supported way for MFA authentication is to use the Connect-SPOService cmdlet but it seems that this cannot be used with the SPMT Register-SPMTMigration cmdlet.

    As per https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/introducing-the-sharepoint-migration-tool-from-microsoft/ba-p/109767#comments. I have not been able to find a statement that MFA is supported in any way via SPMT Powershell.

    Can you please elaborate on the above?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.