I'm new to Graph API and need to get calendar events of the logged in user. I have got this to partly work following this article but I'm only seeing 10 events.
//get calendar events
var startTime = DateTime.Today.ToString("s");
var endTime = DateTime.Now.AddDays(7).ToString("s");
var queryOptions = new List<Microsoft.Graph.QueryOption>()
{
new Microsoft.Graph.QueryOption("startDateTime", startTime),
new Microsoft.Graph.QueryOption("endDateTime", endTime)
};
var calendarView = await graphClient.Me.Calendar.CalendarView
.Request(queryOptions)
.GetAsync();
ViewData["Events"] = calendarView;
Looking at the properties of calenderView I can see there is: {[@odata.nextLink, https://graph.microsoft.com/beta/me/calendar/calendarView?startDateTime=2020-06-12T00%3a00%3a00&endDateTime=2020-06-19T12%3a49%3a37&$skip=10]}
I'm struggling to understand how to loop through the pages so I can return all events to my view.
My application is built around ASP Core 3.1 C# and Graph 3.7.0 and 1.20.1
Any assistance is much appreciated.