I don't see the behavior you are experiencing. The sum of files in my root drive match the size of files indicated on storage metrics. I suggest you try GET https://graph.microsoft.com/v1.0/me/drive/root to see if the size property matches the metrics. Then try the same thing for the child that has different size on your end.
How to get Document folder's total size(as per Storage Metrics) in OneDrive using Microsoft Graph API ?
Mudgal, Kritika
11
Reputation points
Hi Team,
I need to get total size of Documents folder in OneDrive. I can get the same, manually, by going to 'Storage Metrics' of OneDrive. However, I need to get the same using Microsoft Graph API.
But, the sum of size of individual items returned by calling Graph API to get content of Root folder, does not match with the size of Documents folder given in Storage Metrics.
API endpoint used - https://graph.microsoft.com/v1.0/me/drive/root/children
Could you please help with the aforementioned issue?
Thanks
1 answer
Sort by: Most helpful
-
Danstan Onyango 3,741 Reputation points Microsoft Employee
2021-03-22T07:57:15.14+00:00