Sharepoint Migration Tool Powershell - error: credentials incorrect

Nicole 86 Reputation points
2022-01-13T16:49:47.94+00:00

When trying to migrate data from a fileserver to sharepoint via the Sharepoint Migration Tool Powershell cmdlets I recieve the followinf error when verifying my script:

Task GUID did NOT pass the parameter validation, the error message is 'Username or password for target site https://Org.sharepoint.com/sites/... is not correct'

if (-not $cred) {$cred = Get-Credential}  
  
# Specify Migration Endpoints  
$filesource = "\\Path\to\files"  
$SharePointUrl = "https://contoso.sharepoint.com/sites/example"  
$TargetList = "Dokumente/Folder"  
  
# Setup Migration Task  
Register-SPMTMigration -SPOCredential $cred -IncludeHiddenFiles $false -MigrateWithoutRootFolder -Force  
Add-SPMTTask -FileShareSource $filesource -TargetSiteUrl $SharePointUrl -TargetList $TargetList  
  
# Verify Migration Settings  
Start-SPMTMigration -ParametersValidationOnly  

I have checked the requirements with the powershell and sharepoint Version as suggested in another question on this issue sharepoint-migration-tool-powershell-permissions-e.html
The Account in question also has the permissions to access the desired Shareppoint site and can upload and change files there from the web.
Also disabled MFA, but there was no change in behaviour.

After some research I have found a footnote on the following site, citing that in Germany it was not available with some providers via powershell.
overview-spmt-ps-cmdlets
Any suggestions on how I might verify if this was the case for me, or some other advice on troubleshooting the issue before digging through the Logs?

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | For business | Windows
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

Answer accepted by question author
  1. Limitless Technology 40,076 Reputation points
    2022-01-17T11:02:30.887+00:00

    Hi there,

    Try to use Office 365 Global Administrator or Site Collection Administrator to do the migration because the product needs to use the credential to discover the SP tree data.

    Here is a thread as well which discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.
    https://social.technet.microsoft.com/Forums/en-US/416a2b0c-7042-4972-94e5-103befdae10d/sharepoint-migration-tool-error-failed-to-authenticate?forum=sharepointadmin

    If you are redirected with the below error code then you can try checking your credentials.

    0x0201000C Check your credentials and then reenter your username and password.

    Troubleshooting common SPMT issues and errors
    https://learn.microsoft.com/en-us/sharepointmigration/troubleshooting-common-spmt-issues

    ------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,496 Reputation points Microsoft External Staff
    2022-01-14T03:03:49.373+00:00

    Hi @Anonymous ,
    Please check your $cred first. It should be like following code

    $User = "Domain01\User01"  
    $PWord = ConvertTo-SecureString -String "P@sSwOrd" -AsPlainText -Force  
    $Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User, $PWord  
    

    You can also check your data location by following link
    https://admin.microsoft.com/AdminPortal/Home?#/Settings/OrganizationProfile
    164897-image.png

    For more details
    https://learn.microsoft.com/en-us/microsoft-365/enterprise/o365-data-locations?view=o365-worldwide


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.


    1 person found this answer helpful.

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.