- Install Node.js at https://nodejs.org/en/
- Run
npm install
- Register your app at https://apps.dev.microsoft.com
- Update secrets.js with your refresh token and app info (see getting a refresh token below)
- Run
node onenote.js
or click launch in Visual Studio Code
- If you have a university account with Office 365 (Outlook web app), I recommend using that!
- Otherwise, contact Dan (@dansilver82) to get a sample account for the weekend
- If you have an @outlook.com or @live.com email address, you can try using that account for some parts of the Graph
- Register your app at https://apps.dev.microsoft.com
- Under platforms, add web and enter the redirect URL as
https://localhost:3000
- Under
Application Secrets
, clickGenerate New Password
and paste this intosecrets.js
as the client secret - Copy the
Application Id
into secrets.js as theAPPLICATION_ID
- Run
node getLoginUrl
and go to that URL in your web browser - After the redirect, copy the CODE url parameter into
getRefreshToken.js
and runnode getRefreshToken
- Paste that refresh token into
secrets.js
and you're ready to run onenote.js or any of the other demos!
- Microsoft Graph Explorer - https://graph.microsoft.io/en-us/graph-explorer
- Microsoft Graph JavaScript library - https://github.com/microsoftgraph/msgraph-sdk-javascript