-
Notifications
You must be signed in to change notification settings - Fork 240
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
Graph SDK Dotnet 5 (Graph api v5) call to get lists in a sharepoint site not listing all lists #2417
Comments
Thanks for raising this @sant2006 Any chance you can share a sample of the code using v4 that returns the correct number of items? |
@andrueastman thanks for responding to my query.
Thanks |
Do you get different results if you run these on graph explorer? (Only difference is the https://graph.microsoft.com/v1.0/sites/root/lists?select=system,*&expand=drive and https://graph.microsoft.com/v1.0/sites/root/lists?$select=system,*&$expand=drive |
@andrueastman I get different results , first query returns 39 lists and no nextLink, second one returns 23 and no nextLink. Thanks. |
I'm using graph api v5 (sdk for dotnet) to get sharepoint lists in a site. As explained in below Microsoft documentation I've used system facet in select query to get the lists. https://learn.microsoft.com/en-us/graph/api/list-list?view=graph-rest-1.0&tabs=csharp . But this is not returning all the lists in the sharepoint site, I get some lists though.
Here is my code
Above code is returning only 50 lists in the site in the first page of results and a null nextLink . With previous version of graph sdk (v4) same code has returned 66 lists.
Tried another approach which also returning 50 lists.
I've used the sdk generated url in graph explorer, that also returned only 50 lists. Could anyone help me with this c# code to get all the lists in a site?
Note: With the second approach if I enable the line which is commented, I get an exception "The server returned an unexpected status code and no error factory is registered for this code: 400". This is thrown from at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter as per the stack trace.
Thanks
Client version
5.37, 5.44.
The text was updated successfully, but these errors were encountered: