OneDrive Personal: how can an existing file be replaced safely after a deferred upload session?

Agent Architect 0 Reputation points
2026-10-05T11:50:06.22+00:00

For Graph v1.0 on a personal OneDrive, an existing-item upload session with

If-Match E1 and deferCommit true accepts all ranges with 202. The item remains

E1. Final metadata PUT with name, conflictBehavior replace and sourceUrl set to

the returned upload URL fails with 400 invalidRequest; the sanitized diagnostic

says content sourceUrl can only contain a data URI. Path and existing-item-ID

forms, with and without an empty file facet, fail alike. If another client first

advances the item to E2, the E1 commit instead returns 412 resourceModified.

Please provide the supported exact endpoint, headers and JSON for committing

staged bytes to the same immutable item ID. Does the final request atomically

compare the target file's frozen eTag at publication, including concurrent native

edits and rename/move/delete/recreate races? Which response/code combinations

guarantee nonpublication? If the final response is lost, how can a client prove

the session cannot later publish before classifying unchanged bytes as failure?

Alternatively, is final-write If-Match on item-ID PUT /content supported with

those atomic semantics? Please distinguish normative guarantees from observed

behavior, identify personal/business/SharePoint applicability and cite the

provider contract. Is the sourceUrl data-URI restriction an implementation or

documentation defect for personal OneDrive?

Microsoft Security | Microsoft Graph
0 comments No comments

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.