Forum Discussion
"Item not found" Issue while extracting Onedrive files into SPFx Webpart using MS Graph API.
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 :
- SPFx Webpart with react framework
- Node Version : v8.17.0
- SharePoint Framework Version : 1.11.0
- Graph API Query : Get all the items in my drive (https://graph.microsoft.com/v1.0/me/drive/root/children)
exception : {"error":{"code":"itemNotFound","message":"Item not found","innerError":{"date":"2021-06-29T19:10:09","request-id":"","client-request-id":""}}}
Thanks in advance ,
Regards,
Babu.
- KrunalRohitBrass Contributor
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.
- m_balcarekCopper ContributorTry using https://developer.microsoft.com/en-us/graph/graph-explorer to validate your rest call.