Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
web265p3 opened this issue Feb 4, 2025 · 0 comments

Comments

@web265p3
Copy link

web265p3 commented Feb 4, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant