I'm syncing calendar events using the #microsoft/microsoft-graph-client npm package with the base url /me/calendarview/delta. It's been working fine until a few days ago. For some reason whenever I create a new calendar event in outlook.office.com and my app syncs, the newly created calendar event has the #removed: {reason: "deleted"} field set.
However when I lookup that same calendar event using the Microsoft Graph Explorer that same event does NOT have the #removed field set. Is there any reason a newly created calendar event would look like it's being deleted during a sync?
I'm using #microsoft/microsoft-graph-client v1.3.0
Steps to recreate:
Create an event using the node graph client by POSTing to /me/calendar/events
Grab a delta of calendar events using /me/calendarview/delta with appropriate deltaLink and access token.
I receive 1 calendar event that has 3 fields, #odata.type, id and #removed. The id field matches the id of the created event in step 1.
If you need more information, let me know. This is affecting some of our users.
Update: I tried a workaround for this issue by calling /me/events/<id> for each #removed calendar entry I receive on a delta sync to verify if the event was truly deleted. However when I call that API via the microsoft-graph-client it returns null. If I make the same GET call via MSFT Graph Explorer then the event is returned.
I left an answer on another question here: https://stackoverflow.com/a/65348721/6806302
In short, I went off yesterday on a hunch inspired by #mattlaabs's comment on the question above, that the startDateTime..endDateTime range of the events delta was to blame.
And in practice, that is exactly the problem. The answer is two part:
Changes to events not in the window always show up in the delta stream as #removed.
The events delta parameters are captured in a "closure", meaning subsequent requests (with a $deltatoken) ignore the startDateTime..endDateTime query parameter.
Understanding both of the above, it seems that the answer is to:
Create wide enough initial startDateTime..endDateTime windows to suite your application's needs
Start new events delta streams (by not providing a $deltatoken) at some defined interval instead of reusing the same one indefinitely
Related
I created recurrent meeting with attendee in Office365 calendar.
Then updated one of occurrence - change subject for creating modifications.
I found Id of master event by graph-explorer and want to update subject.
For updating I used GraphAPI batch:
and as response I got error with code ErrorInternalServerError.
I use batch API because I need to update few events for one time.
After some manipulation I found that if for header Prefer add value as 'outlook.body-content-type='html'' instead 'outlook.body-content-type='text'' or remove it then batch API works correct:
I need to use value of Prefer as 'outlook.body-content-type='text'' because business requirements for text only.
Do you have any idea how to use batch API for my case and with my options?
UPD:
I tried to use update API without batching but also got the same error as for batch API update.
In header I used Prefer as 'outlook.body-content-type='text''
So looks like any update of recurrent event with modifications and header Prefer as 'outlook.body-content-type='text'' finished as InternalServerError
I'm working with Microsoft's Graph API for Outlook calendar events, and I need to fetch the originalStart for exceptions to recurring events on a calendar.
When fetching events using the List events function, I am provided with the events' original start dates, but when I grab a single event using the Get event function, the object returned has no originalStart.
I do receive the event's originalStartTimeZone and originalEndTimeZone, but the original start date is simply missing.
The event resource lists this as a property for events, so I would expect it to be showing up. Any way to get this event without grabbing the entire list of events anew?
I ve checked and confirm originalStart is missing or giving null value. You can look over there as the issue is already known : https://github.com/microsoftgraph/microsoft-graph-docs/issues/4353
I am able to get the originalStart by specifying it in the select query parameter:
https://graph.microsoft.com/v1.0/me/events/<id>?$select=id,subject,originalStart
I'm currently using the Microsoft Graph API to sync calendar events to my local application. It seems to be working fine, except I don't seem to be able to retrieve deleted events. I'm following the instructions for the delta query as laid out by Microsoft here. Those instructions specifically say "By using delta query, you can get new, updated, or deleted events in a calendar view," and in the examples there is an event in the sample response that is deleted.
In my testing, however, I am never able to receive any deleted events. I create an event and call /me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime} and I can see the event. Then I delete the event, make the same call, and the response is empty. I've tried using the deltaToken call, just to be sure I'm getting the events that have changed since my last call, and it does return the deleted event as expected. But I would prefer not to use that, as it requires that my start/end dates always be the same.
Am I just completely missing the point of the delta call, or am I doing something wrong in calling it?
I am using the services as shown here
https://learn.microsoft.com/en-us/graph/delta-query-events
GET /me/calendarView/delta?startDateTime={start_datetime}&endDateTime={end_datetime}
And I am not getting the deleted events when running it using the delta token as shown in the example
https://learn.microsoft.com/en-us/graph/delta-query-events#the-next-round-sample-first-request
...
{
"#odata.type": "#microsoft.graph.event",
"id": "AAMkADk0MGFkODE3LWE4MmYtNDRhOS04OGQLkRkXbBznTvAADb6ytyAAA=",
"#removed": {
"reason": "deleted"
}
},
...
I always get an empty delta response
eg
https://graph.microsoft.com/v1.0/me/calendarView/delta?$deltatoken=R0usmcdvmMuZCBYV0hguCFHvWbSXF
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(event)",
"#odata.deltaLink": "https://graph.microsoft.com/v1.0/me/calendarView/delta?$deltatoken=R0usmcdvmMuZCBYV0hguCFHvWbSXF-PYk6UEH7m4ZdZmSbEIlouKElB10k31BdGZZJ1Os2i",
"value": []
}
You can only obtain deleted items using /delta queries. When calling /calendarView it will give you only the current calendar, not previous iterations of that calendar.
I am using the CalendarView API of Microsoft Graph. Based on the offical documentation: https://graph.microsoft.io/en-us/docs/api-reference/beta/api/user_list_calendarview
I did this:
GET https://graph.microsoft.com/beta/me/calendarview?startDateTime=2016-9-07&endDateTime=2016-10-02
However I don't see any recurring events. I can see other events happens before and after the recurring ones.
More information after the initial posting:
The problem occurs if the date range goes over the week border. For example, I have an recurring event on 2016-09-08, If I set the start date to 2016-09-07 and end date to 2016-09-10, it would work, but if I set the end date to 2016-09-11, the events won't show up.
#Michael Mainer helped to identify the root cause:
The calendar API has a default page size of 10. One should follow the "#odata.nextLink" property to obtain all results. The paged results is not sorted by start date unless "OrderBy" is specifically added.
As Miaosen Wang mention the default page size is 10.
As a workaround you can increase the page size adding the parameters "orderby" and "top" to you query.
params:
$orderby=start/dateTime DESC
$top=100
e.g.
GET https://graph.microsoft.com/beta/me/calendarview?startDateTime=2016-9-07&endDateTime=2016-10-02&%24$orderby=start/dateTime%20DESC"&%24top=100
I have a date field in my document and I would like to set the last updated time of the document, or the time on which a particular event had occurred in the document. My document will have both signers and counter signers as well.
I am developing my application using Rails and I am using the Docusign REST GEM.
You can retrieve the envelope's history and audit events through the audit events API, then once you have your date you can simply set the value of your dateTab using the tab's value property.
NOTE: Make sure you use dateTabs and not dateSignedTabs. Date signed tabs are populated by the platform, based on the date that recipient signs the document.