Himanshu
Himanshu

Reputation: 360

Fetch all events From Office 365 Calendar

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

Upvotes: 2

Views: 2312

Answers (1)

AidaNow
AidaNow

Reputation: 598

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

Upvotes: 4

Related Questions