Unable to PATCH a ToDo Task with a recurrence pattern MS Graph v1.0

Seth Dingwell 26 Reputation points
2022-04-08T18:50:22.357+00:00

The recurrence pattern "range" property seems to have several bugs in the ToDo Graph API. If I create a ToDo Task by posting this:
{
"title": "recurring task ",
"dueDateTime": {
"dateTime": "2022-04-08T00:00:00.0000000",
"timeZone": "UTC"
},
"recurrence": {
"pattern": {
"type": "daily",
"interval": 1,
"month": 0,
"dayOfMonth": 0,
"daysOfWeek": [],
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "endDate",
"startDate": "2022-04-08",
"endDate": "2022-04-11",
"recurrenceTimeZone": "UTC",
"numberOfOccurrences": 0
}
}
}

It get a 201 response and the task is created. However it is created with a range type of "noEnd" and the endDate property is "0001-01-01". If I then try to PATCH it like this:

{
"title": "recurring task patched",
"dueDateTime": {
"dateTime": "2022-04-08T00:00:00.0000000",
"timeZone": "UTC"
},
"recurrence": {
"pattern": {
"type": "daily",
"interval": 1,
"month": 0,
"dayOfMonth": 0,
"daysOfWeek": [],
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "endDate",
"startDate": "2022-04-08",
"endDate": "2022-04-15",
"recurrenceTimeZone": "UTC",
"numberOfOccurrences": 0
}
}
}

I get this error back:

"Invalid JSON, Error converting value \"2022-04-08\" to type 'Microsoft.OData.Edm.Date'. Path 'recurrence.range.startDate', line 1, position 221."

Notice that the error references the startDate.

Through extensive testing I have found that the todo graph api does not seem to support a range endDate at all. No matter what I send on a POST, the range is set to "noEnd", even though the task is created with no error and all the other properties are correct.

In addition to that, the ToDo Graph APi does not seem to support updating range property at all. Once I create a task, any set of values that I send in the range results in the above Invalid JSON error.

I have also encountered similar errors when trying to change the recurrence pattern type.

And finally, I have noticed that while I can create a recurring task with an end date in the Outlook desktop application, I cannot set an task end date if I use the web interface at https://todo.office.com/. There is simply nowhere in the UI to set or change an end date.

Maybe this is expected behavior and end date is not going to be supported any more, but the documentation suggests that it should be. I would like to report this as a bug but I am not sure where to do that.

Any suggestion on how to set or update an end date for a task through the graph api would be appreciated.

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

1 answer

Sort by: Most helpful
  1. 子华 赵 0 Reputation points
    2024-04-16T01:37:56.8133333+00:00

    The bug is not fixed till now ?

    0 comments No comments