Skip to content

Method .getValue() returns only 100 items from *CollectionResponse #1498

@MichalChotvac

Description

@MichalChotvac

Expected behavior

Method .getValue() will return all items from *CollectionResponse

Actual behavior

Method .getValue() returns always first 100 items from *CollectionResponse

Steps to reproduce the behavior

//Fetching the members of a group who are of the type User 
//graph.microsoft.com/v1.0/groups/{group-id}/members/microsoft.graph.user 
UserCollectionResponse usersInGroup = graphClient
    .groups()
    .byGroupId("group-id")
    .members()
    .graphUser()
    .get();

List<User> users = usersInGroup.getValue();
System.out.println(users.size());

While result from iterating it with Page iterator returns different size.

Lib:

<dependency>
    <groupId>com.microsoft.graph</groupId>
    <artifactId>microsoft-graph</artifactId>
    <version>6.1.0</version>
    <exclusions>
        <exclusion>
            <groupId>com.microsoft.graph</groupId>
            <artifactId>microsoft-graph-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>com.microsoft.graph</groupId>
    <artifactId>microsoft-graph-core</artifactId>
    <version>3.1.1</version>
</dependency>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already existsfixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions