I would like to migrate access databases to SharePoint Online, and sometimes the built-in migration wizard fails. I can create the missing tables and relink them with a macro, but I have trouble uploading the data. In order not to keep data correct, I need to keep the values in the ID column the same as in the database.

Add-PnPListItem -List "Test" -Values @{"ID"=11;"TestColumn"="TestString"}

Returns an error saying that the ID field is not updatable. Is there any way to override this ID field temporarily? I am thinking on a workaround to do it reversed, create an empty item first in the list and then look back in the database for the matching record, but I'd like to avoid this, if tere's any other option.


What you would have to do is populate the ID to the value right before the first value in your Access table, e.g. if your Access row starts at ID 10, you'd create items 1 - 9 in SharePoint, then import your data.

Note that Access Services is being deprecated.

  • That would only work if the id's were continous. But this is a live database, records were deleted, old id's not reused. – vilmarci Nov 23 '19 at 12:24
  • IDs are continuous in Lists. – Trevor Seward Nov 23 '19 at 15:15
  • Only during creation. If you have items with ID 1,2 and 3, and delete item with ID 2, the original 3rd item will still have ID 3. – vilmarci Nov 25 '19 at 7:34
  • The SharePoint List Item ID will be 4 in your scenario. – Trevor Seward Nov 25 '19 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.