I am using outlook calendar rest API. While creating an event the attendee is added successfully.
Later if I wish to update the event and add one more attendee I am using PATCH. But it removes any previous attendee of that event.
URL to create the event
POST https://outlook.office.com/api/v2.0/me/events
Body param
{
"Subject": "Discuss the Calendar REST API 2",
"Body": {
"ContentType": "HTML",
"Content": "I think it will meet our requirements!"
},
"Start": {
"DateTime": "2017-04-25T18:00:00",
"TimeZone": "Asia/Kolkata"
},
"End": {
"DateTime": "2017-04-25T19:00:00",
"TimeZone": "Asia/Kolkata"
},
"Attendees": [
{
"EmailAddress": {
"Address": "abc@xyz.com",
"Name": "ABC"
},
"Type": "Required"
}
]
}
URL to update event
PATCH https://outlook.office.com/api/v2.0/me/events/{eventId}
Body param
{
"Attendees": [
{
"EmailAddress": {
"Address": "def@xyz.com",
"Name": "def"
},
"Type": "Required"
}
]
}
After executing this the previous attendee "abc@xyz.com" gets removed and receives a cancelled event mail and the new attendee "def@xyz.com" gets added.
Please help me to solve this issue.