Skip to main content
Question

When retrieving folder IDs using BoxSDK, there are cases where duplicate folder IDs are returned.

  • November 21, 2025
  • 1 reply
  • 8 views

Could you please provide guidance on BoxSDK?

When retrieving folder IDs using BoxSDK, we are encountering an issue where multiple folder IDs are returned even though only one folder should exist.

The following method is being looped, and more than 200 folder IDs are being obtained.
Since we have specified modified_at for sorting, we suspect that this issue occurs because the timing of folder updates overlaps with the timing of the loop that retrieves folder IDs. Is this assumption correct?

Also, could you please advise on how to avoid this issue?

method  : BoxClient.SearchManager.QueryAsync()
parameter : limit:200,sort: "modified_at",offset:[1+200*n]

1 reply

Hello!

Using offset with modified_at sorting in BoxSDK can cause duplicate folder IDs because updates shift items between pages. To avoid this, use marker‑based pagination for stable results, choose a less volatile sort field, or deduplicate IDs client‑side.