4

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.

Grokify
  • 15,092
  • 6
  • 60
  • 81
JustCurious
  • 183
  • 1
  • 11
  • ``ResponseRequested=false`` indicates to the receiving client whether the user should Accept/Reject the meeting request. While a good feature when you send meeting invitations to a lot of people and don't want your inbox cluttered with responses, it is not relevant for this scenario. – RasmusW Aug 15 '17 at 11:28

1 Answers1

3

You may want to refer with this threads:

It suggested the following workarounds:

  • Uncheck the box in send invitation to the group.
  • When creating the calendar event if you set the Status to Free and Reminder to None, the appointment will be set on the calendar and an invite to the group will not be sent.
  • set the parameter AlwaysSubscribeMembersToCalendarEvents to False
abielita
  • 13,147
  • 2
  • 17
  • 59
  • 2
    well, thanks for you answer +1, however- it's not a clean solution, will wait for api update, at the meantime, I moved to EWS, which has the `Microsoft.Exchange.WebServices.Data.SendInvitationsMode.SendToNone` option while saving the appointment. thanks anyway – JustCurious Aug 15 '17 at 09:01
  • Hi Any update you found on the API level for disabling email? I also need this functionality to disable events' email via v1.0/users//events` API. – Pujaba Zala Aug 04 '22 at 07:14