I am working on Outlook Calendar Events integration using Microsoft Graph Api in Xamarin forms. Also, i have done with the Authentication part but i have some queries related to fetching of Calendar Events.
Q. I am able to fetch Calendar Events through my code , but its limited to "10" events only. I am not able to fetch all my outlook calendar events.
Client = new GraphServiceClient("https://graph.microsoft.com/v1.0/",
new DelegateAuthenticationProvider(async (requestMessage) =>
{
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", authResult.AccessToken);
}));
var events = await Client.Me.Calendar.Events.Request().GetAsync();
var appointmentList = events.ToList();
foreach (var appointment in appointmentList)
{
Random randomTime = new Random();
Meetings.Add(new Model.Meeting()
{
From = Convert.ToDateTime(appointment.Start.DateTime).ToLocalTime(),
To = Convert.ToDateTime(appointment.End.DateTime).ToLocalTime(),
EventName = appointment.Subject,
Color = colorCollection[randomTime.Next(9)]
});
}
Can anyone help me out to fetch all the calendar events??
Thanks.