简体   繁体   中英

Microsoft Graph API get calendar changes in a time interval, filter by lastModifiedDateTime

Im trying to get the modified or created events in the calendar, after a specific date.

  1. Following documentation link , i can use this url to get the events of this year.

https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00

  1. Since i want to get only the modified or created events after a specific date im trying to use filter and lastModifiedDateTime attibute, by this way

https://graph.microsoft.com/v1.0/me/calendarview?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&$filter=lastModifiedDateTime%20gt%202020-10-01T00:00:00z

trying to get the events which were modified this month, i get a empty response, not even errors.

  1. I also tried this way documentation link using

https://graph.microsoft.com/v1.0/me/calendarView/delta?startDateTime=2020-01-01T00:00:00&endDateTime=2021-01-01T00:00:00&lastModifiedDateTime%20gt%202020-10-01T00:00:00z

but it returns all the events of the year and does not filter by lastModifiedDateTime.

There are any proper way to get the modified or created calendar events after a specific date?

Looks like calendarView does not work properly with filter, a working alternative is filter list events, Documentation Link

A working url looks like this : https://graph.microsoft.com/v1.0/me/calendar/events?$filter=lastModifiedDateTime%20gt%20" + date + "z"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM