regarding file id change of a file.

KolaparthiVamsi Krishna 0 Reputation points
2026-08-12T09:49:01.4333333+00:00

if a file in the sharepoint is deleted and uploaded again , will the file id change.

what happens if file is just updated , does file id change.

we connect to sharepoint via microsoft drive id and further credentials, and we noticed file id changed.

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-08-12T09:49:18.8466667+00:00

    If a file is deleted and then uploaded again, it is treated as a new file. That means it is no longer the same item as the original file, so the file ID can change.

    If a file is updated by replacing it with a new file using the same name in a document library, SharePoint can keep it as the same document item when the file is checked out, replaced, and then checked back in. If versioning is enabled, SharePoint creates a new version and keeps earlier versions. That indicates an update/version operation does not create a new file item in the same way as delete-and-upload.

    A practical distinction is:

    1. Delete + upload again: creates a new file item, so a different file ID is expected.
    2. Update/replace existing file: typically updates the existing document and creates a new version if versioning is enabled, rather than creating a brand-new item.

    This matches the observed behavior where a renamed and re-uploaded file is treated as a new file rather than the original one.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.