List item IDs will not be preserved in migrations performed without Insane mode enabled, or when running a migration with Insane Mode to an On-Premises destination.
These two scenarios use the regular SharePoint API which assigns the List Item IDs values automatically. Preserving the List Item IDs for any version of SharePoint using this API would require that we manipulate the content database directly, resulting in voiding your SharePoint warranty. Due to this, and the fact that the database is not available on Microsoft 365, List Item IDs cannot be supported outside of Insane Mode or to an On-Premises destination.
Disclaimer: The following workaround is provided as-is, without any warranty or support. It has not been tested for all scenarios, and as a result it may not work in all cases. In the case that this workaround does not work or stops working, there are no alternative solutions we can provide.
Should you wish to attempt to preserve list item IDs without using the Microsoft 365 migration API, the following workaround is offered as an alternative:
Note: The following procedure will allow you to preserve list item IDs, however it involves some manual steps and it will not preserve permissions, version history and attachments.
- Ensure ShareGate Desktop's performance options are set to Minimal (this will ensure a single thread so that the IDs are copied sequentially. If another settings is set, it might not work because of multi-threading).
- Create a new list in your destination (ensure it never had any items created in it, an empty list that used to have items that were deleted will not work).
- Copy items (in any order) into your destination list, until you have items with the same ID numbers as at the source (even if the wrong items have the wrong IDs). For example, if you have IDs 1 to 100 in your source list, make sure you have items with IDs 1 to 100 in your destination list.
- If there are gaps in IDs at the source (for example, no item with ID 30), you will need to delete the items in the destination in order to have the same gaps (so in my example, delete the item with ID 30).
- In ShareGate Desktop, drill down to your source list and click on Bulk edit content.
- Select all the items and click Export metadata.
- Save it in your preferred location.
- In ShareGate Desktop, drill down to your destination list and click on Bulk edit content.
- Select Import and Edit.
- Create a new column (single line of text) in the destination list called Old ID (or another preferred name).
- Map the ID column from the source to that new Old ID column through the map properties option.
- Set the workflow to use that column instead.
For more information, see Are list item IDs preserved during migration?