"Item not found" Issue while extracting Onedrive files into SPFx Webpart using MS Graph API.

New Contributor

Hi Team , 

Need a help . I'm trying to extract OneDrive files from SPFx Webpart using MS Graph API but I'm unable to get the Information from the below API

Documentation :https://developer.microsoft.com/en-us/graph/graph-explorer ]

API URL : https://graph.microsoft.com/v1.0/me/drive/root/children

Please have a look at the below Information and let me know for any further more information and help me to resolve the Issue ASAP.

Background : 

exception : {"error":{"code":"itemNotFound","message":"Item not found","innerError":{"date":"2021-06-29T19:10:09","request-id":"","client-request-id":""}}}

 

Babu506_0-1624993497747.png

Babu506_1-1624993575496.png

 

Thanks in advance , 

 

Regards,

Babu.

2 Replies

@Babu506Since it is an "Item not found", I would suggest to go stone by stone.

First check the response for /me/drive/root, and see if it (root folder) has any items.