Graph client for OneDrive upload doesn’t work with some accounts
For a few days now, uploads to a previously used OneDrive account have been unsuccessful with an error message:
Status Code: BadRequest, Microsoft.Graph.ServiceException: Code: invalidRequest, Message: Invalid request….ClientRequestId…
However, it works perfectly fine with a newly created OneDrive account. This is where the code gets stuck:
var uploadSession = await graphClient.Me.Drive.Root
.ItemWithPath(folder + fileName)
.CreateUploadSession(uploadProps)
.Request()
.PostAsync();
I haven’t changed anything with the old account. Another user has also encountered the problem with their previously used account. The Azure service associated with the Graph API doesn’t report any issues, I’m not aware of any critical updates/version change, and I have no idea where to start from here. In the application, the user connects to their own account and uploads a zip file there.
Addition after two months: The same thing happened with the newly created OneDrive account I mentioned in my previous post. It worked for two months and has been stuck with the same error message as the first case for the past two days.
I can’t think of anything other than there being some sort of quota in the Graph API that prevents uploading over a certain amount, time, or total file size. Does anyone have information on this?
For a few days now, uploads to a previously used OneDrive account have been unsuccessful with an error message:Status Code: BadRequest, Microsoft.Graph.ServiceException: Code: invalidRequest, Message: Invalid request….ClientRequestId…However, it works perfectly fine with a newly created OneDrive account. This is where the code gets stuck:var uploadSession = await graphClient.Me.Drive.Root
.ItemWithPath(folder + fileName)
.CreateUploadSession(uploadProps)
.Request()
.PostAsync();I haven’t changed anything with the old account. Another user has also encountered the problem with their previously used account. The Azure service associated with the Graph API doesn’t report any issues, I’m not aware of any critical updates/version change, and I have no idea where to start from here. In the application, the user connects to their own account and uploads a zip file there. Addition after two months: The same thing happened with the newly created OneDrive account I mentioned in my previous post. It worked for two months and has been stuck with the same error message as the first case for the past two days.I can’t think of anything other than there being some sort of quota in the Graph API that prevents uploading over a certain amount, time, or total file size. Does anyone have information on this? Read More