Issue with Graph API PATCH Request to Update Excel Range: HTTP 405 Error
Jagapathi Seemakurthy
0
Reputation points
We are encountering an issue when attempting to update a range in an Excel worksheet using the Microsoft Graph API. The request fails with the following error:
405 - HTTP verb used to access this page is not allowed.
Request Details:
- URL:
https://graph.microsoft.com/v1.0/me/drive/items/01BQLIGHUFYSJCUP7JRNGIIWTK4EN77TIG/workbook/worksheets/%7B37CC9684-A622-4277-9481-105A62D56E47%7D/range(address='A32003:H34002')
- Method:
PATCH
- Headers:
-
Authorization: Bearer ********
-
Content-Type: application/json
-
Accept: application/json
- Body: (trimmed for brevity)
-
-
-
Observations:
- The error suggests that the HTTP verb (
PATCH
) is not allowed. - We suspect there might be a redirect happening during the call, as we see the following URL in the logs:
https://pus13-excel.officeapps.live.com/x/_layouts/xlrestinternal.aspx?ui=en-US&rs=en-US&WOPISrc=https%3a%2f%2f{{domain}}.sharepoint.com%2fpersonal%2f{{user-id}}%2f_vti_bin%2fwopi.ashx%2ffiles%2f92c60b80b9814e66960f6ea3571decab&wdEnableRoaming=1&mscc=1&wdODB=1&hid=8d6f90a1-20c3-4000-e90b-e480f15ecfcb&wdRestPart=_api%2fworksheets(%27%257B37CC9684-A622-4277-9481-105A62D56E47%257D%27)%2frange(address%3d%27A32003%3aH34002%27)
- This issue does not happen every time. We write data in batches of 1000 rows, and while most batches succeed, one of the batches occasionally fails with this error.
Questions:
- Is there a known issue with
PATCH
Requests for updating Excel ranges via the Graph API? - Could the redirect to the
pus13-excel.officeapps.live.com
domain be causing the issue? If so, how can we handle this? - Are there any additional configurations or headers required to ensure the request is processed correctly?
- Could this be related to inconsistencies when processing large batches?
Any guidance or suggestions to resolve this issue would be greatly appreciated. Thank you!
Sign in to answer