Skip to content

GetFolderByServerRelativeUrlAsync doesnt work well with the foreach constructor and the 100 item limit #1605

Open
@web265p3

Description

@web265p3

Category

  • Bug

Describe the bug

GetFolderByServerRelativeUrlAsync will not play well with the async foreach constructor.
In a subfolder that has > 100 files, the iteration will be limited to 100 only.

Steps to reproduce

    var result = await context.Web.GetFolderByServerRelativeUrlAsync(folderPath);
    c = 0;
    await foreach(var folder in result.Folders)
    {
        c++;
    }

//c will be 100, even in a larger set, even though everything should be loaded.
How can I retrieve all items?

Environment details (development & target environment)

I am using PnP.Core 1.14.97-nightly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions