1
votes

I am trying to set the reminder of a calendar event to None by code using Microsoft Office 365 API

I am passing -1 value to Microsoft.Office365.OutlookServices.Portable.dll, v1.0.41.0 (using the updated DLL's) Event class reminder property and creating the event

enter image description here

The event is causing issue in Outlook as I am passing -1 to nullable integer type reminder and it is taking it as -1 minutes to the value of reminder. OKAY. Makes sense.

But it is not allowing me to create an event with null as reminder and taking 15 minutes as default value to reminder.

enter image description here

Moreover it is not updating the reminder value of any event to null but when I set any reminder to none in Office 365 then trying to fetch the event, it is fetching the value as null. And when I am setting -1, it is OK in Office 365 web portal but creating issues in Outlook synced events on Desktop

Please suggest what value of reminder should I pass or how can I create an event with None as Reminder in Office 365. Please let me know if I missed anything or if any other info is required.

2

2 Answers

0
votes

You need to set the IsReminderOn property to false to turn off the reminder. This property is available in the v2.0 and beta endpoints of the API. This should be available in the Microsoft.Office365.OutlookServices-V2.0 nuget package.

https://msdn.microsoft.com/office/office365/api/complex-types-for-mail-contacts-calendar#RESTAPIResourcesEvent

-1
votes

From this release notes document ,Currently you can't set a reminder from the client library or directly via REST when you're creating or updating events. The event reminder field is not updated, but no error is returned. For example , i set the Reminder property of event as 1 : enter image description here

After adding this event to calendar successfully, you could use fiddler to grap the post request , you will find no Reminder information will post to the api endpoint : enter image description here

Also if you not set the Reminder property,it will be set as null ,and will also add the event successfully.When checking that event in O365, the reminder will be 15 minutes .