0
votes

I'm trying to write an app that can access documents on a SharePoint teamsite. It is my understanding that OneDrive for Business and a SharePoint teamsite are more or less the same thing. I was thinking the OneDrive for Business API should be able to do this, but so far I have had no luck accessing any documents outside of my OneDrive page.

https://dev.onedrive.com/

Posted on sharepoint.stackexchange.com: https://sharepoint.stackexchange.com/questions/169051/how-can-i-access-a-sharepoint-document-repository-with-onedrive-for-business-api

1

1 Answers

0
votes

I think I've figured it out. You can the following to list the root level folders of a sharepoint site: https://{tenant}.sharepoint.com/{site-path}/_api/v2.0/drive/root/children

Where, if you are looking at the URL of the SharePoint teamsite homepage {tenant} and {site-path} are:

https://{tenant}.sharepoint.com/{site-path}/_layouts/15/start.aspx#/SitePages/Home.aspx