OneDrive- createUploadSession API returning 400 response code

Copper Contributor

I was trying to create an upload session on OneDrive for Business account using Graph API, but it is returning 400 invalid request error.


I was passing fileSize in body and its giving 400 error code.

Without fileSize parameter it is working fine.


The API I am calling:{user-id}/drive/items/{folder-id}:/Presentation.pptx:/createU...














In the documentation, it is written:

If the fileSize parameter is specified and exceeds the available quota, a 507 Insufficent Storage response will be returned and the upload session will not be created.


If it is not possible this way, is there any other way to know if the file can be uploaded without exceeding the quota?


I just want to know if the user has enough quota to upload the file.



0 Replies