Open supersime opened 3 years ago
@supersime Thank you for reporting this issue!
Can you please provide a request-id and a client-request id for this error?
@supersime
The id property functions primarily as a correlation value to associate individual responses with requests. This allows the server to process requests in the batch in the most efficient order.
https://docs.microsoft.com/en-us/graph/json-batching?context=graph%2Fapi%2F1.0&view=graph-rest-1.0
The ids are not the event ids. Can you please trying changing the values of the ids and let me know if that works? https://docs.microsoft.com/en-us/graph/sdks/batch-requests?tabs=typescript
Thanks @nikithauc ... yes I certainly understand the event ids do not need to be the ids... we are, however, using the event ids as the ids because this makes the correlation easier for us (without an interim step to generate a new id just for the batch post).
I have just reproduced as follows:
{
"requests": [
{
"url": "/me/events/AAMkADU2ZmU2MTE3LTYxYWQtNGU0Mi05MmU0LWU1ZWFhNTM2NmM1YgBGAAAAAAAXZ-bpSu6cRoxPjVciIsNcBwDTaXQE7hV-QZy91ycCynXBAAAAAAENAADTaXQE7hV-QZy91ycCynXBAAAF5QtgAAA=?$select=subject,organizer,attendees,start,end",
"method": "GET",
"id": "g"
},
{
"url": "/me/events/AAMkADU2ZmU2MTE3LTYxYWQtNGU0Mi05MmU0LWU1ZWFhNTM2NmM1YgBGAAAAAAAXZ-bpSu6cRoxPjVciIsNcBwDTaXQE7hV-QZy91ycCynXBAAAAAAENAADTaXQE7hV-QZy91ycCynXBAAAF5QtGAAA=?$select=subject,organizer,attendees,start,end",
"method": "GET",
"id": "G"
}
]
}
and the error response:
{
"error": {
"code": "BadRequest",
"message": "Request Id G has to be unique in a batch.",
"innerError": {
"date": "2021-04-27T00:17:07",
"request-id": "af710e55-1994-4cd8-986c-95c99012113b",
"client-request-id": "77e36343-5f30-1e6f-37d1-3e74ae1762d5"
}
}
}
The issue is only because there are two ids that are identical when you don't consider the case. Essentially it is treating "g" and "G" as the same and therefore a duplicate. But these are not the same.
@supersime The Graph API design intends to be case insensitive. The issue you reported highlights a bug and Thank you for reporting it! I am following up on this issue and I will provide an update as and when I learn more about this.
Thanks @nikithauc ... I assume you mean the design intends to be case sensitive? That's great news... I look forward to hearing about its resolution.
Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage:
https://aka.ms/msgraphsupport or directly https://aka.ms/askgraph
For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK. Please let us know if this helps!
Note: We will close this repository on April 19, 2024.
We are sending
POST
requests to the/$batch
endpoint of the graph to retrieve multiple calendar events. A request looks like this:Notice that the "url" and "id" in the two events are almost identical... the 5th last character is "g" in the first request, and "G" in the second request. The "id" we pass in, is the id of the outlook calendar event.
The graph sdk responds with the following error:
I would have expected the api request to allow this, as they are two separate, unrelated calendar events.
"@microsoft/microsoft-graph-client": "^2.2.1" Running on node v14.15.4
AB#9124