Outlook 365 API - Disable automatic email send when creating Calendar event

Viewed 2811

I'm working on a project to migrate Gmail calendar events into Outlook 365, the process is to export the Gmail calendar events using Google Calendar API v3, then convert it to compatible outlook event JSON, then post to Outlook API, using:

POST https://outlook.office.com/api/v2.0/me/events

https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations#create-events

The problem I'm facing is that when the event is created on the 365, it automatically sends an email to all attendees, whether it's old or new event.

As for migrating, it's very bad behavior, migrating 500 events with 3 attendees each, means 1500 email send.

I want to just create the event static as possible, without any email send etc.

I also tried to add a ResponseRequested=false property, but it's do nothing.

Here's an example JSON body with two attendees:

{
  "Body":{
    "ContentType":"TEXT",
    "Content":"Some text to show"
  },
  "Organizer":{
    "EmailAddress":{
      "Name":"Mr. User",
      "Address":"user@domain.com"
    }
  },
  "Subject":"MySubject",
  "Attendees":[
    {
      "EmailAddress":{
        "Name":"John Bon",
        "Address":"John@bon.com"
      },
      "Status":{
        "Response":"NotResponded"
      }
    },
    {
      "EmailAddress":{
        "Name":"James Claims",
        "Address":"James@Claims.com"
      },
      "Status":{
        "Response":"Declined"
      }
    }
  ],
  "Start":{
    "DateTime":"2017-08-09T13:00:00+03:00",
    "TimeZone":"Etc/GMT+2"
  },
  "End":{
    "DateTime":"2017-08-09T14:00:00+03:00",
    "TimeZone":"Etc/GMT+2"
  },
  "ResponseRequested":false
}

The Post URI is:

POST https://outlook.office.com/api/v2.0/users/user@domain.com/calendars/events"
Authorization: Bearer ya29.GoAB......

Also, if I'm going on a bad direction, and you have a better idea how to accomplish my mission, will be happy to hear...

Any help is much appreciated.

1 Answers
Related