I’m trying to get a list of all events in my Outlook calendar. However when trying to use /me/events
, I’m not receiving any events back.
I can however list all my calendars with /me/calendars
. I can also list all the events in one of the public holidays calendar with /me/calendars/{CALENDAR_ID}/events
, but when I try to do the same with my personal calendar I’m not getting anything back.
During the OAuth flow I’ve requested all permissions: Calendars.ReadBasic Calendars.Read Calendars.ReadWrite
.
await msftClient.api('/me/events').get()
{
'@odata.context': "https://graph.microsoft.com/v1.0/$metadata#users('[email protected]')/events",
value: []
}
await msftClient.api('/me/calendars').get()
{
'@odata.context': "https://graph.microsoft.com/v1.0/$metadata#users('outlook_1338A354C5FA734F%40outlook.com')/calendars",
value: [
{
id: '1234',
name: 'Calendar',
....
},
{
id: '5678',
name: 'United States holidays',
....
}
]
}
await msftClient.api('/me/calendars/1234/events').get()
{
'@odata.context': "https://graph.microsoft.com/v1.0/$metadata#users('[email protected]')/calendars('12345')/events",
value: []
}
await msftClient.api('/me/calendars/5678/events').get()
{
'@odata.context': "https://graph.microsoft.com/v1.0/$metadata#users('[email protected]')/calendars('5678')/events",
value: [
{},
{},
{}
]
}