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-Prem destination. These use the regular SharePoint API which assigns these values automatically.
Should you wish to attempt to preserve list item IDs without using the Office 365 migration API, the following workaround is offered as an alternative:
Disclaimer: The following workaround is provided as-is, without any warranty or support. It might work, or it might fail. It has not been tested on the myriad of possible SharePoint environments. We make no promise that if it has worked once, it will continue to work in the future, although we will not willfully attempt to break it.
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'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).
- Make sure your destination list is a fresh one (it never had any items created in it, not even if they were deleted afterwards).
- Copy items (in any order) in 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, click on Bulk Edit Metadata and connect to your source list.
- Select all the items and click Excel -> Export -> Export Now to export all the items to an Excel file.
- In Sharegate, go back and use Bulk Edit Metadata again to connect to your destination list.
- Click Excel -> Import to import the Excel file created at step 4. Select "Import Now".