Forum Discussion

cristinadulau's avatar
cristinadulau
Copper Contributor
May 15, 2023

Set user/group custom field using Migration API

Hi everybody,

 

I'm using Migration API to import some documents on SharePoint. To set the user/group field I use the UserGroup.xml file.

 

After that, I use the id from the Usergroup.xml file in the Manifset.xml file to specify the value to the user/group field.

 

When I check the object on SharePoint the user/group fields are not populated with the value set on the Manifset.xml file. I am able to select the values manually.

 

Do you have any idea why it is not working?

  • cristinadulau 

    If you're using the Migration API to import documents into SharePoint and you're encountering an issue where the user/group fields specified in the Manifset.xml file are not populated correctly, there could be a few potential causes. Here are some troubleshooting steps you can follow:

     

    1. Verify Correct Field Names: Double-check that the field names specified in the Manifset.xml file match the exact internal field names in SharePoint. You can verify the internal field names by inspecting the field properties in SharePoint or referring to the SharePoint API documentation.

     

    2. Ensure Valid User/Group IDs: Confirm that the IDs referenced in the Manifset.xml file for user/group fields correspond to valid user or group IDs in SharePoint. If the IDs are incorrect or invalid, SharePoint will not be able to map them correctly to the appropriate users or groups.

     

    3. Validate XML Structure: Ensure that the XML structure of the Manifset.xml file is correct, with the appropriate tags, attributes, and values for the user/group fields. A malformed or improperly structured XML file could prevent SharePoint from interpreting the values correctly.

     

    4. Check Migration API Compatibility: Verify that the version of the Migration API you're using is compatible with the SharePoint version you're targeting. Incompatibility between the Migration API and SharePoint could lead to issues with correctly populating user/group fields.

     

    5. Review Error Logs: Review any error logs or console output from the Migration API to identify any specific error messages or warnings related to the user/group field population. These logs may provide insights into the root cause of the issue.

     

    6. Test with a Single Document: If the issue persists, try importing a single document with the user/group field specified in the Manifset.xml file. This can help narrow down whether the problem is specific to the XML configuration or if it's a more general issue with the Migration API or SharePoint configuration.

     

    If you've followed these steps and the issue still persists, consider reaching out to the official support channels of the Migration API or SharePoint for further assistance. Provide them with the relevant details, including your XML files, error logs, and any other pertinent information, to help them diagnose and address the issue more effectively.

     

    If I have answered your question, please mark your post as Solved
    If you like my response, please give it a like

Resources