msgraph-sdk-python-core
msgraph-sdk-python-core copied to clipboard
fix(batch): fix sequencing requests json key
Overview
According to this document and real test, the json key is dependsOn
https://learn.microsoft.com/en-us/graph/json-batching?tabs=http#sequencing-requests-with-the-dependson-property
Demo
Optional. Screenshots, curl examples, etc.
Notes
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
Testing Instructions
Can be test in Graph Explorer, POST to https://graph.microsoft.com/v1.0/$batch, if use depends_on the reminder will not change.
{
"requests": [
{
"id": "0",
"method": "PATCH",
"url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA",
"dependsOn": [],
"headers": {
"accept": "application/json",
"content-type": "application/json"
},
"body": {
"isReminderOn": true,
"reminderMinutesBeforeStart": 0
}
},
{
"id": "1",
"method": "POST",
"url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA/extensions",
"dependsOn": [
"0"
],
"headers": {
"accept": "application/json",
"content-type": "application/json"
},
"body": {
"@odata.type": "#microsoft.graph.openTypeExtension",
"updated_at": "2025-08-07T07:40:41.111442Z",
"extensionName": "com.example.Sth"
}
},
{
"id": "2",
"method": "GET",
"url": "/me/events/AAkALgAAAAAAHYQDEapmEc2byACqAC-EWg0A2lcW9Zl8mk2NWtdO8T_CbwAHVZHSDgAA",
"dependsOn": [
"1"
],
"headers": {
"prefer": "odata.maxpagesize=1000, IdType=\"ImmutableId\", outlook.timezone=\"Asia/Shanghai\", outlook.body-content-type=\"text\"",
"accept": "application/json"
}
}
]
}