Search code examples
calendaroffice365office365api

Office365 API returns 404 on GetCalendars on some accounts


I'm using the Office365 as described in the documenation website to get a user's calendars from Office365 account, but getting a 404 error instead: "GET /api/v1.0/Me/Calendars HTTP/1.1" 404

The user has authorized access and I've managed to receive his personal details one request before.
The scopes I have authorized are Calendars.Read Calendars.ReadWrite UserProfile.Read. The access token response contains the endpoint URL and it's the one I'm using: 'Calendar_api_endpoint': u'https://outlook.office365.com/api/v1.0'

For most of the users, this operations works flawlessly. But for some it fails without any more information.

In case an Office365 engineer sees this, here are the request IDs and time (UTC):
2015-08-06 07:58:10.824550: Request id 2d3238e3-e3a6-436a-a2a6-5abb1f693e65 completed. Server id: 4c645b19-4a64-4203-8af5-7b4960f10593, Status: 404


Solution

  • Off the cuff, you can see this error if the user's mailbox is not actually hosted in Office 365. For example, they may be in a hybrid scenario and their mailbox may be on an on-premise Exchange server. I'll ask our engineers to look at your request ID.