Duplicated Data-Item Elemets in Paging

APIPointNewbie 146 Reputation points


I have the following problem the pages are limited with data items and I have thought of the following solution

var driveItems = new List<DriveItem>();
            while (search.NextPageRequest != null)
                search = await search.NextPageRequest.GetAsync();
            return driveItems;

I wanted to test this by setting only 10 entries per page:

 search = await graphClient.Drives[searchInfos.DriveId]

but then I get some duplicates.

What have I done wrong ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,344 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,605 questions
{count} votes

1 answer

Sort by: Most helpful
  1. APIPointNewbie 146 Reputation points

    Hello, when I run my code and pass a top = 10 (.Top(10)) as a parameter, some files repeat in my result list (C#).