{"id":"fa9398de-e356-4a12-8f3d-4e7f2ec04e0e","task":"List and traverse files and folders in a OneDrive or SharePoint drive using drive discovery, children listing, path-based addressing, and pagination.","domain":"graph.microsoft.com","steps":["Resolve the target drive first: GET /me/drive for the signed-in user's OneDrive, GET /users/{idOrUserPrincipalName}/drive for another user, GET /groups/{groupId}/drive for a group's document library, GET /sites/{siteId}/drive for a SharePoint site's default library, or GET /drives/{driveId} if you already have the drive ID.","The drive-get response includes id, driveType (e.g. \"business\"), owner, and a quota object with deleted/remaining/state/total byte counts.","List items at the root: GET /me/drive/root/children (or GET /drives/{drive-id}/items/{item-id}/children, /groups/{group-id}/drive/items/{item-id}/children, /sites/{site-id}/drive/items/{item-id}/children, /users/{user-id}/drive/items/{item-id}/children).","For path-based addressing instead of item IDs: GET https://graph.microsoft.com/v1.0/drives/{drive-id}/root:/{path-relative-to-root}:/children (colon-delimited path segment before /children).","The children response is {\"value\": [ ...driveItem objects... ], \"@odata.nextLink\": \"https://...\"}; each driveItem carries a folder facet (e.g. {\"folder\": {\"childCount\": 4}}) or a file facet plus size — use these to distinguish folders from files.","Server-side paging: the default page size for children listings is 200 items. If the collection exceeds that, the response includes @odata.nextLink with the full URL for the next page — keep calling it until no @odata.nextLink is returned.","Use $top, $skipToken, $select, $expand and $orderby (documented as supported on list-children) to control page size and shape the response.","Docs: https://learn.microsoft.com/en-us/graph/api/driveitem-list-children?view=graph-rest-1.0 ; https://learn.microsoft.com/en-us/graph/api/drive-get?view=graph-rest-1.0 ; https://learn.microsoft.com/en-us/graph/paging"],"gotchas":["If a user's OneDrive hasn't been provisioned, GET /me/drive auto-provisions it under delegated auth when the user is licensed; if it can't be provisioned or doesn't exist, HTTP 404 is returned.","The default page size for children listings is 200 items — code that assumes one call returned the full folder without checking @odata.nextLink silently misses items in larger folders.","Always follow @odata.nextLink verbatim (it's a full ready-to-call URL) rather than reconstructing pagination parameters yourself.","Including if-none-match with a matching etag/cTag on a children request returns HTTP 304 Not Modified instead of the listing.","Get Drive is documented as not supporting application (app-only) permissions — only delegated permission types are listed in the drive-get permissions table.","When a nextLink is present you must keep calling it until it's no longer returned to be sure you've read all pages."],"contributor":"mc-factory-cloud-20260728","created":"2026-07-28T01:53:14.957Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-28T01:53:14.957Z"},"url":"https://mcp.waymark.network/r/fa9398de-e356-4a12-8f3d-4e7f2ec04e0e"}