-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- SPFx 1.15
- Node.js 16
Describe the bug / error
We use SharePoint’s $batch endpoint to batch our calls. Below you can find the request, payload and the response. Running the two GET operations individually works, but it fails when batching. The exact same call to the $batch endpoint works fine in 4 other tenants. Is there a tenant level setting in SharePoint Online that would block using batching?
Payload:
--batch_d461665b-dbac-4472-bbc4-819c754e550a
Content-Type: application/http
Content-Transfer-Encoding: binary
GET https://tenant.sharepoint.com/sites/spappcatalog/_api/web/allProperties?$select=storageentitiesindex HTTP/1.1
--batch_d461665b-dbac-4472-bbc4-819c754e550a
Content-Type: application/http
Content-Transfer-Encoding: binary
GET https://tenant.sharepoint.com/sites/spappcatalog/_api/SP.UserProfiles.PeopleManager/GetMyProperties HTTP/1.1
--batch_d461665b-dbac-4472-bbc4-819c754e550a--
Response:
--batchresponse_14f24ebc-a471-41ce-b460-3109e6f38879
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
CONTENT-TYPE: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":"Invalid request."}}
--batchresponse_14f24ebc-a471-41ce-b460-3109e6f38879
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 400 Bad Request
CONTENT-TYPE: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
{"error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":"Invalid request."}}
--batchresponse_14f24ebc-a471-41ce-b460-3109e6f38879--
Steps to reproduce
- Use the payload above to POST a request to the $batch endpoint.
Expected behavior
Response should have the expected output.
