We're getting the following error when we try to create a new driveItem(file). I checked the documentation but everything seems fine. I'm not experienced with this API but can it be that something changed recently? It says the 'parentReference' was not allowed there but it clearly is, looking at the documentation of driveItem. We didn't change the code too. Any ideas?
Request:
POST https://graph.microsoft.com/v1.0/drives/{driveId}/items/{itemId}/children
SdkVersion : graph-java/v1.5.0
{ "file": {}, "name": "....pdf", "parentReference": { "driveId": "b!CI0Uhi...", "id": "01BRIXMT..." } }
Response:
400 : Bad Request
Transfer-Encoding : chunked
Strict-Transport-Security : max-age=31536000
Cache-Control : no-store, no-cache
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"South Central US","Slice":"E","Ring":"5","ScaleUnit":"005","RoleInstance":"SN4PEPF0000085A"}}
client-request-id : 535b6eab-c9ad-45a2-9bc9-7264c935014d
Vary : Accept-Encoding
request-id : 202ce588-4f71-436c-b9f2-28e95a572eda
Date : Fri, 11 Nov 2022 20:18:32 GMT
Content-Type : application/json
{ "error": { "code": "invalidRequest", "message": "The item cannot contain a parentReference", "innerError": { "date": "2022-11-11T20:18:33", "request-id": "202ce588-4f71-436c-b9f2-28e95a572eda", "client-request-id": "535b6eab-c9ad-45a2-9bc9-7264c935014d" } } }