msgraph-sdk-php icon indicating copy to clipboard operation
msgraph-sdk-php copied to clipboard

Upload large files to OneNote returns a blank response and 200 status code

Open elgranchuy opened this issue 3 years ago • 2 comments

According to the documentation

The Microsoft Graph REST API has a 4 MB request limit. Anything above this will fail with the error message "request too large (413)".

When uploading a file to OneNote endpoint /me/onenote/sections/{section_id}/pages with a large document attached as body > 4mb. a blank response is returned with a status code of 200. But the page is never created.

So either the library or the API is not throwing a proper error exception. AB#9401

elgranchuy avatar May 11 '21 21:05 elgranchuy

Also, if its not possible with the Graph API to upload such large files what's the workaround then? i could not find the ONENOTE REST API documentation

elgranchuy avatar May 11 '21 21:05 elgranchuy

The documentation is here: https://docs.microsoft.com/en-us/graph/api/section-post-pages?view=graph-rest-1.0 for creating the page. For updating a page, https://docs.microsoft.com/en-us/graph/api/page-update?view=graph-rest-1.0&tabs=http

Regarding the size limit and how to handle that for OneNote, we'll need to get more information on that.

@roinochieng Can you loop in someone from OneNote to answer this.

MIchaelMainer avatar May 20 '21 14:05 MIchaelMainer

Related to #934

Ndiritu avatar Oct 06 '22 07:10 Ndiritu

Being tracked under #934

Ndiritu avatar Oct 06 '22 07:10 Ndiritu