0

I have a recurring event, repeated 5 days in a row, of which:

  • the occurrence on 16/3 was modified (caption and times)
  • the occurrence on 18/3 was modified (caption, to distinguish it), then deleted

enter image description here

If I get all instances of the event (List event instances) with ({{ }} are Postman variables):

https://graph.microsoft.com/v1.0/users/{{UserID}}/calendar/events/{{RecurrEventID}}/instances?startDateTime={{start_datetime}}&endDateTime={{end_datetime}}

This is what's in the result data:

"type": "exception"  on 16/3 with "subject": "Test recurring (master) modi occur"
"type": "occurrence" on 15/3 with "subject": "Test recurring (master)",
"type": "occurrence" on 17/3 with "subject": "Test recurring (master)",
"type": "occurrence" on 19/3 with "subject": "Test recurring (master)",
        

If I get the specific master event (Get event) with:

https://graph.microsoft.com/v1.0/users/{{UserID}}/calendar/events/{{RecurrEventID}}

there also is no mention of the deleted occurrence (see JSON below).

I also used the List calendar view endpoint, without success.

How can I retrieve the deleted occurrence?
I need this to properly sync with another calendar.

{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('someone%40somewhere.onmicrosoft.com')/calendar/events/$entity",
"@odata.etag": "W/\"TOKyZMcf20SwxQO/5Vw7WAAC1HM=\"",
"id": "AAMkADI2ZGIwY2FlLTA1NDQtNGFhYi1hNDJmLWEyMGJhZWU5NmM2YgBGAAAAAACrxyqss0H-T5iGuqwSXncoBwB1kc8DNbIxRK3H-NcbpuL8AAAAAAENAABV1BT8PvI4S78XiwEQP4DVAATuyF7pAAA=",
"createdDateTime": "2023-03-15T15:52:37.3104494Z",
"lastModifiedDateTime": "2023-03-15T15:54:06.696Z",
"changeKey": "TOKyZMcf20SwxQO/5Vw7WAAC1HM=",
"categories": [],
"transactionId": null,
"originalStartTimeZone": "W. Europe Standard Time",
"originalEndTimeZone": "W. Europe Standard Time",
"iCalUId": "040000008200E00074C5B7101A82E008000000009063E97D5E57D9010000000000000000100000003E9EF82FC4F68B47AA38749DEC560C23",
"reminderMinutesBeforeStart": 15,
"isReminderOn": true,
"hasAttachments": false,
"subject": "Test recurring (master)",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay": false,
"isCancelled": false,
"isOrganizer": true,
"responseRequested": true,
"seriesMasterId": null,
"showAs": "busy",
"type": "seriesMaster",
"webLink": "https://outlook.office365.com/owa/?itemid=AAMkADI2ZGIwY2FlLTA1NDQtNGFhYi1hNDJmLWEyMGJhZWU5NmM2YgBGAAAAAACrxyqss0H%2FT5iGuqwSXncoBwB1kc8DNbIxRK3H%2FNcbpuL8AAAAAAENAABV1BT8PvI4S78XiwEQP4DVAATuyF7pAAA%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl": null,
"isOnlineMeeting": false,
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals": true,
"occurrenceId": null,
"isDraft": false,
"hideAttendees": false,
"responseStatus": {
    "response": "none",
    "time": "0001-01-01T00:00:00Z"
},
"body": {
    "contentType": "html",
    "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta name=\"ProgId\" content=\"Word.Document\">\r\n<meta name=\"Generator\" content=\"Microsoft Word 15\">\r\n<meta name=\"Originator\" content=\"Microsoft Word 15\">\r\n<style>\r\n<!--\r\n@font-face\r\n\t{font-family:\"Cambria Math\"}\r\n@font-face\r\n\t{font-family:Calibri}\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0cm;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",sans-serif}\r\na:link, span.MsoHyperlink\r\n\t{color:#0563C1;\r\n\ttext-decoration:underline}\r\na:visited, span.MsoHyperlinkFollowed\r\n\t{color:#954F72;\r\n\ttext-decoration:underline}\r\nspan.E-mailStijl17\r\n\t{font-family:\"Calibri\",sans-serif;\r\n\tcolor:windowtext}\r\n.MsoChpDefault\r\n\t{font-family:\"Calibri\",sans-serif}\r\n@page WordSection1\r\n\t{margin:70.85pt 70.85pt 70.85pt 70.85pt}\r\ndiv.WordSection1\r\n\t{}\r\n-->\r\n</style>\r\n</head>\r\n<body lang=\"NL\" link=\"#0563C1\" vlink=\"#954F72\" style=\"word-wrap:break-word\">\r\n<div class=\"WordSection1\">\r\n<p class=\"MsoNormal\">&nbsp;</p>\r\n</div>\r\n</body>\r\n</html>\r\n"
},
"start": {
    "dateTime": "2023-03-15T09:00:00.0000000",
    "timeZone": "UTC"
},
"end": {
    "dateTime": "2023-03-15T10:00:00.0000000",
    "timeZone": "UTC"
},
"location": {
    "displayName": "",
    "locationType": "default",
    "uniqueIdType": "unknown",
    "address": {},
    "coordinates": {}
},
"locations": [],
"recurrence": {
    "pattern": {
        "type": "daily",
        "interval": 1,
        "month": 0,
        "dayOfMonth": 0,
        "firstDayOfWeek": "sunday",
        "index": "first"
    },
    "range": {
        "type": "numbered",
        "startDate": "2023-03-15",
        "endDate": "0001-01-01",
        "recurrenceTimeZone": "W. Europe Standard Time",
        "numberOfOccurrences": 5
    }
},
"attendees": [
    {
        "type": "required",
        "status": {
            "response": "none",
            "time": "0001-01-01T00:00:00Z"
        },
        "emailAddress": {
            "name": "somewhere Development Extern",
            "address": "someone@somewhere.nl"
        }
    }
],
"organizer": {
    "emailAddress": {
        "name": "somewhere Development Extern",
        "address": "someone@somewhere.nl"
    }
},
"onlineMeeting": null,
"calendar@odata.associationLink": "https://graph.microsoft.com/v1.0/users('someone@somewhere.onmicrosoft.com')/calendars('AAMkADI2ZGIwY2FlLTA1NDQtNGFhYi1hNDJmLWEyMGJhZWU5NmM2YgAuAAAAAACrxyqss0H-T5iGuqwSXncoAQB1kc8DNbIxRK3H-NcbpuL8AAAAAAENAAA=')/$ref",
"calendar@odata.navigationLink": "https://graph.microsoft.com/v1.0/users('someone@somewhere.onmicrosoft.com')/calendars('AAMkADI2ZGIwY2FlLTA1NDQtNGFhYi1hNDJmLWEyMGJhZWU5NmM2YgAuAAAAAACrxyqss0H-T5iGuqwSXncoAQB1kc8DNbIxRK3H-NcbpuL8AAAAAAENAAA=')"
}
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144

1 Answers1

1

cancelledOccurrences where added in beta (back in 2020) https://developer.microsoft.com/en-us/graph/changelog/?search=cancelledOccurrences#8a32aa94-ac63-42d3-b323-5312bfc80a9dbeta I can't say if or when it will make it into the production endpoint. The only other way of getting that data is to parse out the Recurrence blob https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxocal/524aa19d-7bac-4ecd-8afe-0eefe863250f

You can get the recurrence blob using

https://graph.microsoft.com/v1.0/me/events/AA...AA=?$expand=singleValueExtendedProperties($filter=id+eq+'Binary+{00062002-0000-0000-C000-000000000046}+Id+0x8216')
Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
Glen Scales
  • 20,495
  • 1
  • 20
  • 23
  • Thanks. That beta change is from August 2020 ;-) Can I use the beta? How would I get at the 'recurrence blob'? – Jan Doggen Mar 16 '23 at 06:40
  • 1
    If you think 2020 is good what about https://developer.microsoft.com/en-us/graph/changelog/?search=referenceAttachment been in beta since 2016. You can use the beta but it comes with the risk of you app not working (if they pull or change the feature) of behaving in unexpected ways in the future and having limited support. I put a sample of how to get the recurrence blob in the answer. – Glen Scales Mar 16 '23 at 22:42
  • For people reading along, if you go the way of parsing the recurrence blob: in this specific example: DeletedInstanceCount=2, DeletedInstanceDays=16/3 and 18/3, ModifiedInstanceCount=1, ModifiedInstanceDates=16/3. So the deleted instance dates point to every *regular* occurence that is no longer in the pattern. If you 'subtract' the modified instance dates you are left with the actual deleted occurrences. – Jan Doggen Mar 22 '23 at 09:38
  • If I use the beta there are no canceledOccurrences or exceptionOccurrences in the result data for this event https://graph.microsoft.com/beta/users/someone@somewhere.onmicrosoft.com/events/AAMkADI2ZGIw[snip]AAA= – Jan Doggen Mar 22 '23 at 11:36