Home » Java » java – How to change Office 365 Event List size-Exceptionshub

java – How to change Office 365 Event List size-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

Hope you well… How can I get past the fact that the collection only returns 10 event items per request, whereas I have more than those events created. How do I overwrite the default settings/implementation customize

`IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

LinkedList<Option> requestOptions = new LinkedList<Option>();
requestOptions.add(new HeaderOption("Prefer", "outlook.timezone=\"Pacific Standard Time\""));

    IEventCollectionPage events = graphClient.me().events()
        .buildRequest( requestOptions )
        .select("subject,body,bodyPreview,organizer,attendees,start,end,location")
        .get();
    events.getCurrentPage();/**This always return only 10 events! Is there anways One can alter/tweak here.**/
`
How to&Answers: