A simple project which demonstrates how to create a Node.Js console app that connects the MSGraph and accesses SharePoint.
https://medium.com/@mbarben/sharepoint-on-the-graph-e813e838f604
- You will need to setup Azure AD Application first, that will give you the
clientId
clientSecret
tenentid
values - Clone the report
git clone https://github.com/anvilation/sharepoint-graph
- browse to the folder and install modules
npm install
- Copy
/test/test.config.ts
to/test/config.ts
and update the corresponding values - Update the
/src/index.ts
file and update the following constants:sharePointHost
the host name for your tenantsharePointSiteAddress
the relative location of your SharePoint SitelistName
The name of a list that you want to queryuploadFile
the location of a file that you want to upload with
- To run run
npm run dev
- There are is also an additional integrationt tests by running
npm run test