microsoftgraph / msgraph-sdk-serviceissues

Tracks service issues for follow up.
5 stars 0 forks source link

ErrorDuplicateTransactionId after creating many events with same TransactionId #99

Open tjmoore opened 3 years ago

tjmoore commented 3 years ago

For test purposes I have a tool that generates test data with hundreds of events across a large number of test room mailboxes. To make it easy to track the test events and delete them after I create them all with the same TransactionId.

This works fine for many events in same or different mailboxes with the same TransactionId, but then starts throwing a 400 Bad Request with ErrorDuplicateTransactionId code and the message:

Your request can't be completed. The TransactionId specified in the request has already been used to create a different event.

Which is an odd message when the same TransactionId has been accepted for a hundred or so other events.

I'm sending these in batch requests. I'm using the .NET Graph SDK, but the following is a dump of a typical request it sends and the response.

POST https://graph.microsoft.com/v1.0/users/<ROOM_MAILBOX>/events

{
    "end": {
        "dateTime": "2021-06-11 14:19:52",
        "timeZone": "UTC",
        "@odata.type": "microsoft.graph.dateTimeTimeZone"
    },
    "start": {
        "dateTime": "2021-06-11 14:04:52",
        "timeZone": "UTC",
        "@odata.type": "microsoft.graph.dateTimeTimeZone"
    },
    "subject": "Event 27",
    "transactionId": "ABC1234",
    "@odata.type": "microsoft.graph.event"
}
{
    "error": {
        "code": "ErrorDuplicateTransactionId",
        "message": "Your request can't be completed. The TransactionId specified in the request has already been used to create a different event.",
        "@event.existingEventId": "<EVENT_ID>"
    }
}

Noting this is just a test situation to generate test data scaled up to a large number of rooms and events. In production the TransactionId set is unique per event.

I can work around this with unique TransactionId per event with a common value part I can search on for tests. It just seems an odd error.

I'd expect it to fail on the first duplicate if duplicates are not allowed. Also, what is the scope that makes them duplicate? Is this per tenant, or application? I'd have thought mailbox, but I've been able to create multiple events in the same mailbox with the same TransactionId.

petrhollayms commented 5 months ago

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.