I am facing the following issue while getting files/folders for OneDrive of a user.
On hitting
https://graph.microsoft.com/v1.0/users/{user-id}/drive
I get this in the response:
"quota": {
"deleted": 0,
"remaining": 0,
"total": 0,
"used": 0
}
which denotes that the drive isn't being used or is empty.
On hitting
https://graph.microsoft.com/v1.0/users/{user-id}/drive/root
I get the response -
"folder": {
"childCount": 21
},
"root": {},
"size": 281236319
Here, it denotes that there are 21 files/folders in the drive's root folder and they occupy 281.23 MB of space.
Now, on hitting https://graph.microsoft.com/v1.0/users/{user-id}/drive/root/children
I get empty vector in the response -
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('user-id')/drive/root/children",
"value": []
}
There are files present in the drive. But I am not able to get them via the children API. Any help in understanding these 3 different results and getting the response would be appreciated
Thanks.