I have some code the uses the ID of an item in a list or document library to work fully. Now that our site has been migrated from SP2010 to SP in O365 the documents and list entries being returned do not tally with the ones that should be returned. Is there a way of migrating whilst retaining the SP ID?
In the last year SharePoint online has launched an Migration API that will retain Documents IDs,
Any 3rd party tools that support that API will get that benefit if they are using it right.
ShareGate, Metalogix and AvePoint are the ones that have an product out there to do it. There is Also some PowerShell Commands in Preview but are harder to use.
How you migrate from SharePoint 2010 to Office 365? i think either you use 3rd party tool or manually move the data. In manaually migration, idont think you can retian it but if you are using the 3rd party tools then they have option to retain the GUID.
i.e ShareGate have a feature called "Migrate content with their Document IDs"