In the Microsoft Graph SDK for Java, there used to be a method
graphClient.sites("YOUR_SITE_ID").lists("YOUR_LIST_ID").items().buildRequest()
You could use it like this:
GraphServiceClient<Request> graphClient = GraphServiceClient
.builder()
.authenticationProvider(authProvider)
.buildClient();
// Make a request to get list items
IListRequest request = graphClient.sites("YOUR_SITE_ID").lists("YOUR_LIST_ID").items().buildRequest();
try {
ListCollectionPage listPage = request.get();
When I pull in
<microsoft-graph.version>6.4.0</microsoft-graph.version>
<dependency>
<groupId>com.microsoft.graph</groupId>
<artifactId>microsoft-graph</artifactId>
<version>${microsoft-graph.version}</version>
</dependency>
I do not seem to have the the buildRequest method any more.
What is the equivalent in this newer version?
buildRequestdoesn't exist any more. The code for SDK v6 to get list items will look like thisTo iterate all pages, use
PageIteratorhttps://github.com/microsoftgraph/msgraph-sdk-java/blob/dev/docs/upgrade-to-v6.md#pageiterator