FAIL - Batch update with mutiple events is failing in Graph API

Vedant Desai 136 Reputation points
2021-05-27T13:55:36.193+00:00

Hello There,

I was using batch API for creating multiple meetings/events for your use case.

POST https://graph.microsoft.com/1.0/$batch (combine a POST and a GET)

We found that the meeting got created successfully in our calendar, we received an error response for other meetings
Error: "Cannot send this mail due to a transient error. Please try again later (0x00004000).",

This functionality was supported in outlook api, could you please check

Kindly help me here!

Thanks
Vedant Desai

URL : POST https://graph.microsoft.com/1.0/$batch

Request :
{
"requests": [
{
"id": 141,
"url": "/me/events",
"method": "POST",
"body": {
"subject": "Meeting Created - 01",
"body": {
"contentType": "Text",
"content": "Meeting Created - 01"
},
"start": {
"dateTime": "2021-05-30T08:00:00Z",
"timeZone": "UTC"
},
"end": {
"dateTime": "2021-05-30T08:30:00Z",
"timeZone": "UTC"
},
"location": {
"displayName": "Meeting Created - 01"
},
"isAllDay": false,
"attendees": [
{
"emailAddress": {
"address": "vedant.desai@jaswant .com",
"name": "Sales Agent"
}
}
]
},
"headers": {
"Content-Type": "application/json"
}
},
{
"id": 142,
"url": "/me/events",
"method": "POST",
"body": {
"subject": "Meeting Created -02",
"body": {
"contentType": "Text",
"content": "Meeting Created -02"
},
"start": {
"dateTime": "2021-05-31T08:00:00Z",
"timeZone": "UTC"
},
"end": {
"dateTime": "2021-05-31T08:30:00Z",
"timeZone": "UTC"
},
"location": {
"displayName": "Meeting Created -02"
},
"isAllDay": false,
"attendees": [
{
"emailAddress": {
"address": "vedant.desai@jaswant .com",
"name": "Sales Agent"
}
}
]
},
"headers": {
"Content-Type": "application/json"
}
}
]
}

Response :
{
"responses": [
{
"id": "141",
"status": 201,
"headers": {
"Location": "https://outlook.office.com/api/beta/Users('00037ffe-3c65-1ce9-0000-000000000000@84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa')/Events('AQMkADAwATM3ZmYAZS0zYzY1LTFjZTktMDACLTAwCgBGAAADYNcBv3ymb0q1vYI0LBtZbAcArup3CF2wFU6_M8fhPyUaWQAAAgENAAAArup3CF2wFU6_M8fhPyUaWQAAABc_z7gAAAA=')",
"Cache-Control": "private",
"OData-Version": "4.0",
"Content-Type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8",
"ETag": "W/\"rup3CF2wFU6+M8fhPyUaWQAAFzh3Ew==\""
},
"body": {
"@odata.context": "https://graph.microsoft.com/beta/$metadata#users('vedant.freshworks%40outlook.com')/events/$entity",
"@odata.etag": "W/\"rup3CF2wFU6+M8fhPyUaWQAAFzh3Ew==\"",
"id": "AQMkADAwATM3ZmYAZS0zYzY1LTFjZTktMDACLTAwCgBGAAADYNcBv3ymb0q1vYI0LBtZbAcArup3CF2wFU6_M8fhPyUaWQAAAgENAAAArup3CF2wFU6_M8fhPyUaWQAAABc_z7gAAAA=",
"createdDateTime": "2021-05-27T13:50:30.6701553Z",
"lastModifiedDateTime": "2021-05-27T13:50:31.3867603Z",
"changeKey": "rup3CF2wFU6+M8fhPyUaWQAAFzh3Ew==",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"uid": "040000008200E00074C5B7101A82E008000000000527EA41FF52D70100000000000000001000000032DFA540003C5B4090098A068CBCE94B",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Meeting Created - 01",
"bodyPreview": "Meeting Created - 01",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.live.com/owa/?itemid=AQMkADAwATM3ZmYAZS0zYzY1LTFjZTktMDACLTAwCgBGAAADYNcBv3ymb0q1vYI0LBtZbAcArup3CF2wFU6%2BM8fhPyUaWQAAAgENAAAArup3CF2wFU6%2BM8fhPyUaWQAAABc%2Bz7gAAAA%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"recurrence": null,
"onlineMeeting": null,
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta name=\"Generator\" content=\"Microsoft Exchange Server\"><!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head><body><font size=\"2\"><span style=\"font-size:11pt;\"><div class=\"PlainText\">Meeting Created - 01</div></span></font></body></html>"
},
"start": {
"dateTime": "2021-05-30T08:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2021-05-30T08:30:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "Meeting Created - 01",
"locationType": "default",
"uniqueId": "Meeting Created - 01",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "Meeting Created - 01",
"locationType": "default",
"uniqueId": "Meeting Created - 01",
"uniqueIdType": "private"
}
],
"attendees": [
{
"type": "required",
"status": {
"response": "none",
"time": "0001-01-01T00:00:00Z"
},
"emailAddress": {
"name": "Sales Agent",
"address": "vedant.desai@freshworks.com"
}
}
],
"organizer": {
"emailAddress": {
"name": "Vedant Desai",
"address": "vedant.freshworks@harsh.com .com"
}
}
}
},
{
"id": "142",
"status": 403,
"headers": {
"Cache-Control": "private",
"Content-Type": "application/json"
},
"body": {
"error": {
"code": "ErrorMessageTransientError",
"message": "Cannot send this mail due to a transient error. Please try again later (0x00004000).",
"innerError": {
"date": "2021-05-27T13:50:31",
"request-id": "2066f687-874f-4647-8115-670a2b15f9b4",
"client-request-id": "560d6b71-e75f-6fbd-c309-08b0ed03155d"
}
}
}
}
]
}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,248 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee
    2021-05-30T03:41:44.097+00:00
    • Just to isolate the issue, try repro the same call with Graph Explorer.
    • Check the M365 service status @ https://status.office365.com/ to make sure all the services of M365 are working properly. If there is an issue, check Microsoft support.
    • Still if you see the issue, re-try the same call to see if it succeeds.

  2. Vedant Desai 136 Reputation points
    2021-05-30T14:18:16.267+00:00

    Yes. I above request I tried with graph explorer only.

    0 comments No comments