Hello Andrada Bordei,
Thank you for reaching out to Microsoft Support!
It sounds like you're encountering an issue with pagination in the Microsoft Graph API when trying to retrieve files from a specific folder.
When you use the $top
parameter to limit the number of items returned, the API should paginate the results and provide a @odata.nextLink
for the next set of items. However, it seems like the pagination isn't working as expected in your case.
Use the Correct Endpoint: Make sure you're using the correct endpoint for listing items in a folder. The endpoint should be:
GET https://graph.microsoft.com/v1.0/sites/{site-id}/drives/{drive-id}/items/{item-id}/children?$top=2
Please note $count is not supported when you use above Graph API.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.