0
votes

We have a SharePoint subscription and an Azure subscription. I want to make a web app that is hosted in Azure, but the database for the app would basically be SharePoint lists. I'm looking up documentation on how to do this, but I'm just finding how to make "web parts" and they keep assuming I want to build my website inside SharePoint rather than outside.

How do I access a user's SharePoint lists from outside of SharePoint?

1

1 Answers

0
votes

The easy part is the request for data. Use the SharePoint REST API. The harder part is authentication. How is the Azure app related to the SharePoint app? Same user login?

A sample REST call for select columns from a list:

https://yourDoamin/sites/yourSite/_api/web/lists/getbytitle('My List')/items?$select=Title,Price,Qty

The REST API also support filtering and sorting along with insert, update and delete.

A filter example:

https://yourDoamin/sites/yourSite/_api/web/lists/getbytitle('My List')/items?$select=Title,Price,Qty&$filter=Title eq 'Toys'

If you would like to experiment with the REST API from your SharePoint site, I have "REST tester" you can add to a Content Editor Web Part.

https://github.com/microsmith/SharePointRESTtester