Nicholas DiPiazza Nicholas DiPiazza - 6 months ago 35
reST (reStructuredText) Question

Microsoft Graph API - /drive/root/children always empty, even though I have files in my onedrive

I'm trying to use the Microsoft Graph API to List Children by Getting access without a user

I have built my URL as you would expect:


is the user ID of whom I'm trying to list the files.

Yet when I call this I get an empty result every time:

"@odata.context": "$metadata#drive/root/children",
"value": []

Why is that?

UPDATE: It seems that this API is only returning files from the Sharepoint account... not the OneDrive account. I already have access to the Sharepoint files from the Sharepoint API's themselves. Is there a way to get OneDrive files from the Microsoft Graph API?

This URL seems to state that we should be able to do this.

Answer Source

I just had a typo in the User:

was supposed to be'edffcd1c-e5b2-42f2-b554-XXXXXXXXX')/drive/root/children

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download