Upload Url too long

Sin, Gregory 5 Reputation points
2023-09-06T16:59:19.0033333+00:00

I am attempting to use the Graph API to upload large files to OneDrive. I make a request to get an upload session. I get a response for a successfully created upload session. When I try to use the URL that is returned, I get an error back from the Graph API saying the url it provided is too large to use.

{"code":"invalidRequest","innerError":{"code":"badArgument"},"message":"The length of the URL for this request exceeds the configured maxUrlLength value."}

Below is an example of what the url from the API returns. It has been editted to not have any actual information, but is the exactly length and format of the URL that is returned.

"uploadUrl":"https://companygroup-my.sharepoint.com/personal/gregory_sin_work_email_com/_api/v2.0/drive/items/53V535W5B5Z5J5T55H5Z52555I5IU545D5/uploadSession?guid='55555555-5555-5555-5555-555555555555'&overwrite=True&rename=False&dc=0&tempauth=yyX0eXAjKjJKH1TjLCJ4bGbiOiJIUzI9NiJ9.yyXhdUTiOiIwMFAwMDAwMy00MDA0LTBmZjEtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1EtY2UUFJKSDLJFJLDFLJASLDJADFLJKASDFLJASDLJGFLJASDLJASFJLGFASLJAljasdjlasdLJASDFLJLKS1PwLtu7dO40jqtUQTKHRkzx3tZd94"

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,564 questions
0 comments No comments
{count} votes