1
votes

I need to fetch all events in an office 365 calendar.

Currently the GET request:

https://graph.microsoft.com/v1.0/users/{userPrincipalName}/events

returns only 10 events when we call the API

1

1 Answers

3
votes

How about first counting the number of events first and then making another call with $top query parameter?

https://graph.microsoft.com/v1.0/users/me/events?$count=true

The above api gives you the number of events as "@odata.count": 173 (for example) and then you make this call:

https://graph.microsoft.com/v1.0/users/me/events?$top=173