none
ConvertTo-SPOMigrationTargetedPackage and usermapping file

    Question

  • I'm trying to conduct a test migration by migrating on-prem Sharepoint document library data to an Sharepoint online list.

    Everything seems to be fine when I prepare the data without specifying UserMappingFile parameter for ConvertTo-SPOMigrationTargetedPackage command. The data is successfully imported to target library.

    But when I try to specify a mapping file then I cannot seem to figure out what data should in contain for OnPremSid or how the CSV structure should even look like.

    When I create a CSV with needed header row and add user specific rows then the command fails with

    ConvertTo-SPOMigrationTargetedPackage : Failed to parse user mapping file. There are too many items on the line with text 

    Tried then to format the document so that all rows are on same line and it seemed to fix the error but mapping part still gives error that not all users where mapped. This seems to be related that the converter cannot find correct SID-s. Tried to make correct CSV file with this powershell script https://spwondering.wordpress.com/2016/05/11/sharepoint-online-migration-user-profile-mapping-file/ but still no luck. Has anyone managed to get a hold on the migration so that he/she converted local domain users to O365 users?

    Wednesday, August 10, 2016 10:13 AM

Answers

  • Hi raksile,

    From the error message, it seems that the UserGroup.xml file does not contain any users.

    If that is the case, then you do not need to map the users.

    And if there are undeleted users in the UserGroup.xml file, then it needs to set as one to one mapping in the map file.

    Please use the PowerShell script below for getting the SID of the undeleted users in UserGroup.xml file:

    $systemId="The SystemID of the user in the UserGroup.xml file" //check the SystemID value from the USerGroup.xml file for each undeleted user and change the value here to get the SID for the users one by one manually
    $array = [System.Convert]::FromBase64String($systemId)
    $str = [System.Text.Encoding]::UTF8.GetString($array)
    $decodedSid = $str.SubString("i:0).w|".Length)
    write-host $decodedSid

    Best Regards,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by raksile Wednesday, August 17, 2016 11:33 AM
    Friday, August 12, 2016 7:08 AM
    Moderator
  • Hi everyone

    I finally managed to find the issue thanks to Victorias help. Her powershell commands where also present in https://spwondering.wordpress.com/2016/05/11/sharepoint-online-migration-user-profile-mapping-file/ but then I did not think much off the output as it was some funny characters after running it on my exported Sharepoint result.

    But now I took again a deeper look at the output and script and seeing "i:0).w|" in the script gave me the hint to try running the migration on a site that has claims authentication enabled. After this everything worked as expected and I could map my local domain users to cloud accounts without problems.

    So if anyone finds this forum then ConvertTo-SPOMigrationTargetedPackage needs claims based Sharepoint site as the export base.

    • Marked as answer by raksile Wednesday, August 17, 2016 11:33 AM
    Wednesday, August 17, 2016 11:33 AM

All replies

  • I have read both of the first links and done a test migration with the tips given there.

    But my problem is that I do not understand how the usermapping file should be put together and what information I must use there.

    In the first blog posts comments one fellow says he got the mapping file working after inserting correct SSID but he does not explain what is the correct SSID. I tried the SID value of domain account from AD

    S-1-5-21-363122487-1054604418-2083440123-500

    but this does not work. ConvertTo-SPOMigrationTargetedPackage gives error that user cannot be mapped.

    Thursday, August 11, 2016 5:41 AM
  • Hi,

    Did you remove the deleted users from the CSV file and make sure that all values added in the CSV file were correct?

    I recommend to test with only one user in CSV file and then check how it works.

    Best Regards,

    Victoria

    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, August 11, 2016 8:54 AM
    Moderator
  • Hi

    Left only one entry in the usermapping CVS file but still no luck. Powershell command logs

    11.08.2016 10:31:43 Warning Mismatch between number of users in the UserGroup.xml (found 0 users) and the user mapping file (found 4 users).
    11.08.2016 10:31:43 Warning When remapping users using the user mapping file, there must be a one to one mapping between the mapping file and UserGroup.xml.
    11.08.2016 10:31:43 Error The following user/group names are missing from the user mapping file!
    11.08.2016 10:31:43 Error Failed to translate: LAB1\sp_administrator
    11.08.2016 10:31:43 Error Failed to translate: NT AUTHORITY\authenticated users
    11.08.2016 10:31:43 Error Failed to translate: NT AUTHORITY\LOCAL SERVICE
    11.08.2016 10:31:43 Error Failed to translate: LAB1\test_user
    11.08.2016 10:31:43 Error Fatal exception found: Unmapped users were found after running user mapping file lookup! - 
    11.08.2016 10:31:43 Error Fatal exception found: Unmapped users were found after running user mapping file lookup! - 

    Thursday, August 11, 2016 10:34 AM
  • Hi raksile,

    From the error message, it seems that the UserGroup.xml file does not contain any users.

    If that is the case, then you do not need to map the users.

    And if there are undeleted users in the UserGroup.xml file, then it needs to set as one to one mapping in the map file.

    Please use the PowerShell script below for getting the SID of the undeleted users in UserGroup.xml file:

    $systemId="The SystemID of the user in the UserGroup.xml file" //check the SystemID value from the USerGroup.xml file for each undeleted user and change the value here to get the SID for the users one by one manually
    $array = [System.Convert]::FromBase64String($systemId)
    $str = [System.Text.Encoding]::UTF8.GetString($array)
    $decodedSid = $str.SubString("i:0).w|".Length)
    write-host $decodedSid

    Best Regards,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by raksile Wednesday, August 17, 2016 11:33 AM
    Friday, August 12, 2016 7:08 AM
    Moderator
  • Hi everyone

    I finally managed to find the issue thanks to Victorias help. Her powershell commands where also present in https://spwondering.wordpress.com/2016/05/11/sharepoint-online-migration-user-profile-mapping-file/ but then I did not think much off the output as it was some funny characters after running it on my exported Sharepoint result.

    But now I took again a deeper look at the output and script and seeing "i:0).w|" in the script gave me the hint to try running the migration on a site that has claims authentication enabled. After this everything worked as expected and I could map my local domain users to cloud accounts without problems.

    So if anyone finds this forum then ConvertTo-SPOMigrationTargetedPackage needs claims based Sharepoint site as the export base.

    • Marked as answer by raksile Wednesday, August 17, 2016 11:33 AM
    Wednesday, August 17, 2016 11:33 AM