Hi
The discrepancy arises because the /sites/{siteId}/drives
endpoint does not return system libraries, even though they exist. The Microsoft Graph API filters out libraries such as:
- Site Assets
- Other system-generated libraries
Even if $top
is set higher than the number of user-created libraries, the system will not include system drives in the response unless explicitly.
You can try to include system
to include system libraries: /sites/{siteId}/drives?$select=id,name,system&top=5
Then the accurate number of items is returned.
Reference: https://learn.microsoft.com/en-us/graph/api/drive-list?view=graph-rest-1.0&tabs=http#remarks