Length of the URL for this request exceeds the configured maxUrlLength value

Sin, Gregory 5 Reputation points
2023-08-28T23:11:21.8933333+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."}

Example of what the url from the API returns:

"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"

And am unable to upload using the url

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