Microsoft To Do Graph API: PATCHing recurrence returns “Invalid JSON, Error converting value … to type 'Microsoft.OData.Edm.Date'”

Paul Smith 60 Reputation points
2025-11-02T03:32:30.37+00:00

Hi team — I’m hitting a repeatable issue when PATCHing the recurrence of a To Do task via Microsoft Graph.

Endpoint: PATCH https://graph.microsoft.com/v1.0/me/todo/lists/{list-id}/tasks/{task-id}

What I'm sending (sanitized):
{

"dueDateTime": { "dateTime":"2026-01-15T00:00:00", "timeZone":"UTC" }, "recurrence": {
"pattern": { "type":"weekly", "interval":1, "daysOfWeek":["thursday"] },

"range":   { "type":"endDate", "startDate":"2026-01-15", "endDate":"2026-07-09" }  

}
}

Observed result (HTTP 400):

Invalid JSON, Error converting value "2026-01-15" to type 'Microsoft.OData.Edm.Date'. Path 'recurrence.range.startDate'

(I sometimes get the same message for recurrence.range.endDate.)

Context:

  • Language/SDK: .NET using the Kiota-based Microsoft Graph SDK (Microsoft.Graph v5 family).
  • Other PATCHes (title, note/body, categories, dueDateTime, status) succeed; the failure happens only when a recurrence payload is included.
  • I’ve tried:
    1. Sending recurrence via typed PatternedRecurrence (SDK models).
    2. Sending raw JSON (as above).
    3. Adding firstDayOfWeek and recurrenceTimeZone.
    4. Clearing first, then setting:
      {"recurrence": null}
      followed by the JSON above. The second call still 400s with the same Edm.Date conversion error.
  • Dates are yyyy-MM-dd strings (which should map to Edm.Date). Time zone is set on dueDateTime or range.recurrenceTimeZone depending on the attempt.
  • I also verified the outgoing body by reading the serialized request stream before sending. Representative logs:
    PATCH payload (sanitized / will-send): {"dueDateTime":{"dateTime":"2026-01-15T00:00:00","timeZone":"UTC"}, "recurrence":{"pattern":{"type":"weekly","interval":1,"daysOfWeek":["thursday"]},
               "range":{"type":"endDate","startDate":"2026-01-15","endDate":"2026-07-09"}}}
    
    HTTP 400: Invalid JSON, Error converting value "2026-01-15" to type 'Microsoft.OData.Edm.Date'. Path 'recurrence.range.startDate'
    Expected The task’s recurrence updates to a weekly series on the specified day. This matches the To Do UI semantics. Actual Server returns 400 “Invalid JSON … Edm.Date” on startDate (or endDate) even though they are ISO yyyy-MM-dd strings. Questions
    1. Is there a known issue with todoTask.recurrence Edm.Date handling?
    2. Is there a documented alternate shape for range.startDate/endDate that To Do expects?
    3. Any request headers or shape differences required when setting recurrence (e.g., omit dueDateTime, include specific recurrenceTimeZone, etc.)?
    I can provide request/response headers (including request-id/client-request-id) if helpful. Thanks!
Developer technologies | .NET | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Varsha Dundigalla(INFOSYS LIMITED) 3,480 Reputation points Microsoft External Staff
    2025-11-03T12:06:41.8633333+00:00

    Thank you for reaching out.

    The error occurs because the API expects startDate and endDate as OData Edm.Date values, not regular JSON strings. In Microsoft Graph, these fields must be provided as date literals or using the SDK’s Date type rather than quoted strings. This is a serialization requirement, not a server-side bug. The official documentation confirms these properties are Edm.Date:

    Reference

    Ensure your request uses the correct type for these fields to avoid the conversion error.

    Please let us know if you require any further assistance, we’re happy to help.

    If you found this information useful, kindly mark this as "Accept Answer".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.