The size property in endpoint B represents the total size of all the files and folders in the root folder of the drive. The quota property in endpoint A represents the total storage space allocated to the drive, which includes the size of all the files and folders in the drive, as well as any additional space used by the system. The difference between the two values is the additional space used by the system.
Microsoft OneDrive drive size is different in drive quota compared to root properties
The following endpoint A (https://graph.microsoft.com/v1.0/users/<userId>/drives/<driveId>) returns the Quota resource type (reference: https://learn.microsoft.com/en-us/graph/api/resources/quota?view=graph-rest-1.0) Meanwhile, this endpoint B (https://graph.microsoft.com/v1.0/users/<userId>/drives/<driveId>/root) shows the size of objects saved to OneDrive under the size property. While testing this with my OneDrive for business, I noticed that the 2 values are different. How does Quota consider space used and why is it different from the size of objects saved on the Drive? e.g. Endpoint A:
"quota": {
"deleted": 1256680,
"remaining": 1099476581526,
"state": "normal",
"total": 1099511627776,
"used": 33789570
}
Endpoint B:
"size": 25005496,
I downloaded all files from my drive and seems the value from the endpoint B matches what I see locally.