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.
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.