This question already has an answer here:
Following the answer to this question I removed my Authorization header when uploading the first chunk of my resumable upload.
So creating the session:
POST https://graph.microsoft.com/V1.0/groups/a0aab702-8e58-4f25-b2dd-066e5d110f0c/drive/root:/10cb244a-d181-44df-aabc-51c30d4cf0f5.txt:/createUploadSession HTTP/1.1
Authorization: Bearer XXX
Content-Type: application/json; charset=utf-8
Host: graph.microsoft.com
Content-Length: 75
Expect: 100-continue
{
"item": {
"@microsoft.graph.conflictBehaviour": "replace"
}
}
Response:
HTTP/1.1 200 OK
Cache-Control: private
Transfer-Encoding: chunked
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Location: https://graph.microsoft.com
request-id: 9d93ade6-8072-438b-a9fb-c648376b77ba
client-request-id: 9d93ade6-8072-438b-a9fb-c648376b77ba
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Europe","Slice":"SliceB","ScaleUnit":"002","Host":"AGSFE_IN_5","ADSiteName":"DUB"}}
OData-Version: 4.0
Duration: 1750.2813
Date: Thu, 27 Apr 2017 16:06:35 GMT
93d
{"@odata.context":"https://graph.microsoft.com/V1.0/$metadata#microsoft.graph.uploadSession","expirationDateTime":"2017-04-27T16:21:35.2923217Z","nextExpectedRanges":["0-"],"uploadUrl":"https://peterreay2.sharepoint.com/sites/SharePointTests/_api/v2.0/drive/items/01RZBHEZF6Y2GOVW7725BZO354PWSELRRZ/uploadSession?guid='e13f861f-7aa0-4f9a-b05c-26587ecfab92'&path='~tmp0E_10cb244a-d181-44df-aabc-51c30d4cf0f5.txt'&overwrite=True&rename=False&access_token=XXX&prooftoken=XXX"}
0
So I then try and upload my first chunk, however I'm getting a 404 not found response:
PUT https://peterreay2.sharepoint.com/sites/SharePointTests/_api/v2.0/drive/items/01RZBHEZF6Y2GOVW7725BZO354PWSELRRZ/uploadSession?guid='e13f861f-7aa0-4f9a-b05c-26587ecfab92'&path='~tmp0E_10cb244a-d181-44df-aabc-51c30d4cf0f5.txt'&overwrite=True&rename=False&access_token=XXX&prooftoken=XXX HTTP/1.1
Content-Range: bytes 0-10485759/11534336
Host: peterreay2.sharepoint.com
Content-Length: 10485760
Expect: 100-continue
Connection: Keep-Alive
0123456 etc
Response:
HTTP/1.1 404 Not Found
Server: Microsoft-IIS/8.5
SPRequestGuid: 8825ec9d-b0ed-3000-1791-4c35404935e9
request-id: 8825ec9d-b0ed-3000-1791-4c35404935e9
Strict-Transport-Security: max-age=31536000
X-FRAME-OPTIONS: SAMEORIGIN
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 16.0.0.6420
X-Content-Type-Options: nosniff
X-MS-InvokeApp: 1; RequireReadOnly
P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"
Date: Thu, 27 Apr 2017 16:08:25 GMT
Connection: close
Content-Length: 0
As in my other question, the code doing this used to work (even with a Bearer token). So I think the chunk sizes, byte ranges etc are correct.
Any thoughts on what is going wrong here?
See the answer to the linked question here. There was a bug confirmed and fixed by Microsoft. This fixed our issue with the request including a bearer token. I have not tested this scenario here (without a bearer token).