Share via

error code ErrorOccurrenceTimeSpanTooBig

arun.m@succevo.com 0 Reputation points
2023-10-12T11:10:58.87+00:00

Hi,

I'm trying to understand the MS graph API, but I have been stuck with creating recurrent events in the calendar.

My MS calendar does have one recurrent task already, but again I'm trying to create one more via API request.

share in the JSON request body here.

{
  "subject": "Appoinment",
  "start": {
    "dateTime": "2023-10-13T17:00:00+05:30",
    "timeZone": "Asia/Kolkata"
  },
  "end": {
    "dateTime": "2023-10-14T18:00:00+05:30",
    "timeZone": "Asia/Kolkata"
  },
  "recurrence": {
    "pattern": {
      "type": "weekly",
      "interval": 1,
      "month": 0,
      "dayOfMonth": 0,
      "daysOfWeek": [
        "friday",
        "saturday"
      ],
      "firstDayOfWeek": null,
      "index": "first"
    },
    "range": {
      "type": "endDate",
      "startDate": "2023-10-13",
      "endDate": "2023-10-14",
      "recurrenceTimeZone": "Asia/Kolkata",
      "numberOfOccurrences": 0
    }
  }
}

But getting error

https://graph.microsoft.com/v1.0/users/******@succevo.com/calendar/events` resulted in a `400 Bad Request` response: {"error":{"code":"ErrorOccurrenceTimeSpanTooBig","message":"One occurrence of the recurring calendar item overlaps with another occurrence of the same calendar item."}}

Would like to know what I'm doing wrong here?

Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. arun.m@succevo.com 0 Reputation points
    2023-10-12T11:59:35.0966667+00:00

    Fix:- Weekly recurrent need to remove the start and end object.

    Was this answer helpful?

    0 comments No comments

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.