Getting wrong files/folder list from Sharepoint sites REST APIs

Occasional Visitor

I have been trying to pull Sharepoint documents using MS-Sharepoint REST APIs. And I am able to pull the list of files and folders from an account. All the Sharepoint APIs and setup to pull the Sharepoint data are working fine.

Sharepoint documentation: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest

 

But the issue is, it is working perfectly fine with our Sharepoint account. And when another user tried to integrate Sharepoint with their account's credentials, It gives the 200-Ok response but with the wrong files and folder list - I know this is strange. But it seems like API is pointing to the wrong filesystem location. Because API should return the details of a PDF file, which is only uploaded a file in that Sharepoint account for testing but is returning the "Forms" root folder with some .aspx file in it.

 

The only main difference between a working account and a non-working one: In the working account, I am pulling the Sharepoint file/folder directly from the account drive. Unlike in non-working accounts, we are pulling info Sharepoint sites.

 

I have referred to this link to create the setup to integrate Sharepoint: https://anoopt.medium.com/accessing-sharepoint-data-using-postman-sharepoint-rest-api-76b70630bcbf

 

The enclosed screenshot is from the not-working account where it is showing the wrong files/folders listing instead of the PDF file which is the only file in this account.

 

I also attached the screenshot of a Postman request to pull the files list from a Sharepoint account.

0 Replies