CalendarView REST API returns empty response for Office365 calendar

Anton Koval 16 Reputation points
2021-04-07T19:13:40.98+00:00

NOTE: we still use REST API v2 to query events from the calendar but I don't think it matters in this case

We're observing a problem querying events from one of the calendars of one of our customers. Let me showcase the issue by example.

  1. Requesting calendar events using the calendarview endpoint: URL: https://outlook.office.com/api/v2.0/me/calendars('AAMkADNhNTFhMjkwLTcxYjctNGNhYy05Y2Y5LTRlNTQwZGRjYjJkNwBGAAAAAAAgKfbHeHO9Tq7TrkTHm3XwBwBWzRWLyPyIRo1Je-mGcA2wAAAA-44WAABWzRWLyPyIRo1Je-mGcA2wAAAA-7mbAAA=')/calendarview?enddatetime=2021-04-30T00%3A00%3A00&startdatetime=2021-04-01T00%3A00%3A00 Headers:
    {'Prefer': 'odata.track-changes, odata.maxpagesize=100', 'Authorization': 'Bearer 123'} Response Headers:
    {'X-CalculatedBETarget': 'MN2PR17MB3661.namprd17.prod.outlook.com', 'Rate-Limit-Reset': '2021-04-07T18:49:41.555Z', 'X-Powered-By': 'ASP.NET', 'Transfer-Encoding': 'chunked', 'X-RUM-Validated': '1', 'OData-Version': '4.0', 'X-BackEndHttpStatus': '200, 200', 'X-Proxy-RoutingCorrectness': '1', 'X-BeSku': 'WCS5', 'Date': 'Wed, 07 Apr 2021 18:50:16 GMT', 'Rate-Limit-Limit': '10000', 'Rate-Limit-Remaining': '9948', 'X-AspNet-Version': '4.0.30319', 'Server': 'Microsoft-IIS/10.0', 'X-BEServer': 'MN2PR17MB3661', 'X-DiagInfo': 'MN2PR17MB3661', 'X-FEServer': 'BL1PR13CA0328, MWHPR11CA0046', 'X-FEProxyInfo': 'BL1PR13CA0328.NAMPRD13.PROD.OUTLOOK.COM', 'x-ms-appId': '46f3b333-0273-4584-aee4-34159ea905bf', 'Preference-Applied': 'odata.track-changes', 'Content-Encoding': 'gzip', 'request-id': 'e387dcd6-27c3-45c8-991d-04c73d462a6c', 'Vary': 'Accept-Encoding', 'X-Proxy-BackendServerStatus': '200', 'X-CalculatedFETarget': 'BL1PR13CU011.internal.outlook.com', 'Cache-Control': 'private', 'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8'} Response:
    {'@odata.deltaLink': "https://outlook.office.com/api/v2.0/me/calendars('AAMkADNhNTFhMjkwLTcxYjctNGNhYy05Y2Y5LTRlNTQwZGRjYjJkNwBGAAAAAAAgKfbHeHO9Tq7TrkTHm3XwBwBWzRWLyPyIRo1Je-mGcA2wAAAA-44WAABWzRWLyPyIRo1Je-mGcA2wAAAA-7mbAAA=')/calendarview?enddatetime=2021-04-30T00%3a00%3a00&startdatetime=2021-04-01T00%3a00%3a00&%24deltatoken=4qefBM0T5N1eAnBHiI0dfSx6pakAA9Hf0iYBAAAA", 'value': [], '@odata.context': u"https://outlook.office.com/api/v2.0/$metadata#Me/Calendars('AAMkADNhNTFhMjkwLTcxYjctNGNhYy05Y2Y5LTRlNTQwZGRjYjJkNwBGAAAAAAAgKfbHeHO9Tq7TrkTHm3XwBwBWzRWLyPyIRo1Je-mGcA2wAAAA-44WAABWzRWLyPyIRo1Je-mGcA2wAAAA-7mbAAA%3D')/CalendarView"} value is empty -- no events were returned
  2. Requesting events for the same date range using events endpoint: Request URL:
    https://outlook.office.com/api/v2.0/me/calendars/AAMkADNhNTFhMjkwLTcxYjctNGNhYy05Y2Y5LTRlNTQwZGRjYjJkNwBGAAAAAAAgKfbHeHO9Tq7TrkTHm3XwBwBWzRWLyPyIRo1Je-mGcA2wAAAA-44WAABWzRWLyPyIRo1Je-mGcA2wAAAA-7mbAAA%3D/events?%24top=500&%24orderby=start%2FdateTime+ASC&%24filter=start%2FdateTime+ge+%272021-04-01T00%3A00%3A00%27+and+end%2FdateTime+le+%272021-04-30T00%3A00%3A00%27 Request headers:
    {'Prefer': 'odata.maxpagesize=1000', 'Authorization': 'Bearer 123'} Response headers:
    {'X-CalculatedBETarget': 'MN2PR17MB3661.namprd17.prod.outlook.com', 'Rate-Limit-Reset': '2021-04-07T18:56:19.067Z', 'X-Powered-By': 'ASP.NET', 'Transfer-Encoding': 'chunked', 'X-RUM-Validated': '1', 'OData-Version': '4.0', 'X-BackEndHttpStatus': '200, 200', 'X-Proxy-RoutingCorrectness': '1', 'X-BeSku': 'WCS5', 'Date': 'Wed, 07 Apr 2021 18:55:36 GMT', 'Rate-Limit-Limit': '10000', 'Rate-Limit-Remaining': '9963', 'X-AspNet-Version': '4.0.30319', 'Server': 'Microsoft-IIS/10.0', 'X-BEServer': 'MN2PR17MB3661', 'X-DiagInfo': 'MN2PR17MB3661', 'X-FEServer': 'BL1PR13CA0360, MW4PR04CA0068', 'X-FEProxyInfo': 'BL1PR13CA0360.NAMPRD13.PROD.OUTLOOK.COM', 'x-ms-appId': '46f3b333-0273-4584-aee4-34159ea905bf', 'Content-Encoding': 'gzip', 'request-id': 'a118940d-d35b-4164-ac7f-b7e556e8ac24', 'Vary': 'Accept-Encoding', 'X-Proxy-BackendServerStatus': '200', 'X-CalculatedFETarget': 'BL1PR13CU012.internal.outlook.com', 'Cache-Control': 'private', 'Content-Type': 'application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8'} Response:
    {'value': [<34 events here>], '@odata.context': "https://outlook.office.com/api/v2.0/$metadata#Me/Calendars('AAMkADNhNTFhMjkwLTcxYjctNGNhYy05Y2Y5LTRlNTQwZGRjYjJkNwBGAAAAAAAgKfbHeHO9Tq7TrkTHm3XwBwBWzRWLyPyIRo1Je-mGcA2wAAAA-44WAABWzRWLyPyIRo1Je-mGcA2wAAAA-7mbAAA%3D')/Events"} ^^ there are events in the value

Any ideas why it can be happening?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,713 questions
0 comments No comments
{count} votes