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

%3CLINGO-SUB%20id%3D%22lingo-sub-2498626%22%20slang%3D%22en-US%22%3E%22Item%20not%20found%22%20Issue%20while%20extracting%20Onedrive%20files%20into%20SPFx%20Webpart%20using%20MS%20Graph%20API.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2498626%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Team%20%2C%26nbsp%3B%3C%2FP%3E%3CP%3ENeed%20a%20help%20.%20I'm%20trying%20to%20extract%20OneDrive%20files%20from%20SPFx%20Webpart%20using%20MS%20Graph%20API%20but%20I'm%20unable%20to%20get%20the%20Information%20from%20the%20below%20API%3C%2FP%3E%3CP%3E%3CSTRONG%3EDocumentation%20%3A%3C%2FSTRONG%3E%20%5B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Fgraph%2Fgraph-explorer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Fgraph%2Fgraph-explorer%3C%2FA%3E%26nbsp%3B%5D%3C%2FP%3E%3CP%3E%3CSTRONG%3EAPI%20URL%20%3A%3C%2FSTRONG%3E%20%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2Fdrive%2Froot%2Fchildren%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2Fdrive%2Froot%2Fchildren%3C%2FA%3E%3C%2FP%3E%3CP%3EPlease%20have%20a%20look%20at%20the%20below%20Information%20and%20let%20me%20know%20for%20any%20further%20more%20information%20and%20help%20me%20to%20resolve%20the%20Issue%20ASAP.%3C%2FP%3E%3CP%3E%3CSTRONG%3EBackground%20%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3ESPFx%20Webpart%20with%20react%20framework%3C%2FLI%3E%3CLI%3ENode%20Version%20%3A%26nbsp%3Bv8.17.0%3C%2FLI%3E%3CLI%3E%3CSPAN%3ESharePoint%20Framework%26nbsp%3BVersion%20%3A%201.11.0%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3E%3CSPAN%3EGraph%20API%20Query%20%3A%20Get%20all%20the%20items%20in%20my%20drive%20(%3CA%20href%3D%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2Fdrive%2Froot%2Fchildren%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fme%2Fdrive%2Froot%2Fchildren%3C%2FA%3E)%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3Eexception%20%3A%26nbsp%3B%3C%2FSTRONG%3E%7B%22error%22%3A%7B%22code%22%3A%22itemNotFound%22%2C%22message%22%3A%22Item%20not%20found%22%2C%22innerError%22%3A%7B%22date%22%3A%222021-06-29T19%3A10%3A09%22%2C%22request-id%22%3A%22%22%2C%22client-request-id%22%3A%22%22%7D%7D%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Babu506_0-1624993497747.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292384iD055300D2AB51298%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Babu506_0-1624993497747.png%22%20alt%3D%22Babu506_0-1624993497747.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Babu506_1-1624993575496.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F292386iA86998C835B2FE60%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Babu506_1-1624993575496.png%22%20alt%3D%22Babu506_1-1624993575496.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EBabu.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2516900%22%20slang%3D%22en-US%22%3ERe%3A%20%22Item%20not%20found%22%20Issue%20while%20extracting%20Onedrive%20files%20into%20SPFx%20Webpart%20using%20MS%20Grap%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2516900%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254650%22%20target%3D%22_blank%22%3E%40Babu506%3C%2FA%3ESince%20it%20is%20an%20%22Item%20not%20found%22%2C%20I%20would%20suggest%20to%20go%20stone%20by%20stone.%3C%2FP%3E%3CP%3EFirst%20check%20the%20response%20for%26nbsp%3B%3CSTRONG%3E%2Fme%2Fdrive%2Froot%2C%26nbsp%3B%3C%2FSTRONG%3Eand%20see%20if%20it%20(root%20folder)%20has%20any%20items.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
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.