Building custom solutions that extend, automate, and integrate Microsoft 365 apps.
OneDrive personal: PUT to createUploadSession uploadUrl always returns 401 BadContextToken (reproduced with Graph Explorer)
Hello,
On a personal (consumer) Microsoft account, every PUT to the uploadUrl returned by createUploadSession fails with HTTP 401, so files larger than 250 MB can no longer be uploaded through Microsoft Graph.
Account type: personal Microsoft account (consumer, tid 9188040d-6c67-4c5b-b112-36a304b66dad), free 5 GB plan. Drive quota is normal (about 4.8 GB free, state "normal").
Steps to reproduce (using Graph Explorer's own token, so it is not specific to my app):
- POST https://graph.microsoft.com/v1.0/me/drive/root:/teste-sessao.bin:/createUploadSession Body: {"item":{"@microsoft.graph.conflictBehavior":"rename"}} Result: 200 OK, with an uploadUrl on https://my.microsoftpersonalcontent.com/personal/{cid}/_api/v2.0/drive/items/{id}/uploadSession?...&tempauth=v1e....
- PUT the first chunk to that uploadUrl, exactly as returned, without an Authorization header: Content-Range: bytes 0-327679/327680 (one 320 KiB chunk) Result: 401 Unauthorized, empty body, with: WWW-Authenticate: Wlid1.1 realm="WindowsLive", fault="BadContextToken", policy="MBI_SSL", ver="7.5.0.0", target="ssl.live.com", siteId="ssl.live.com", Bearer realm="9188040d-6c67-4c5b-b112-36a304b66dad", client_id="00000003-0000-0ff1-ce00-000000000000", ...
What I have already ruled out:
- The uploadUrl is used exactly as returned (sent with curl -g), and it contains the tempauth parameter.
- Sending the PUT with an Authorization: Bearer header also returns 401.
- Simple upload (PUT /content) works on the same account for small files, and returns 400 for a 300 MB file, as documented.
- The same behaviour happens from my own app (delegated Files.ReadWrite.AppFolder, authorization code flow) and from Graph Explorer.
- On the same account, earlier the same day, chunked uploads worked (item IDs then had the CID!s... format). Newly created items now have IDs like 0163VNB5..., and the uploadUrl points to my.microsoftpersonalcontent.com. The failures started after that change.
Request identifiers of a failed PUT:
- Time (UTC): 2026-11-13 01:26:00
- request-id / sprequestguid: fa4a4ea2-4000-0001-1949-78e1c2678ada
- date header: Fri, 13 Nov 2026 01:26:00 GMT
Is this a known issue with OneDrive personal accounts on the new my.microsoftpersonalcontent.com infrastructure? Is there a supported way to upload files larger than 250 MB to these accounts through Microsoft Graph?
Thank you.