Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Sample web app for the OneNote Class Notebook APIs

License

Notifications You must be signed in to change notification settings

OneNoteDev/OneNoteCNApiSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneNote Class Notebook APIs Sample

The OneNote Class Notebook APIs let you programmatically create and edit class notebooks. This sample demonstrates the basics on how you would call these APIs using JavaScript, jQuery and ADAL for authentication. To learn more about ADAL you can visit its GitHub page. For full documentation on the class notebook APIs take a look at our article on MSDN.

Please keep in mind that this sample is meant to illustrate how you would reach our APIs in JavaScript and does not necessarily contain all the code you would want for a production-ready application. In a more complete web app you would probably use a framework like AngularJS, add more specific error handling, etc.

If you would like to see a live version of this app we have an instance running on Azure that you can access here.

How To Run This Sample

Step 1. You will need the following

  • An Azure subscription
  • An Office 365 subscription

The Azure subscription should be associated with the Office 365 subscription. Authenticate using Azure AD (enterprise apps) has details on how to do just that.

Step 2. Register your app in Azure and add permissions

Again, follow the instructions under Authenticate using Azure AD (enterprise apps) to register your application in Azure. You will also need to give your app Notes.ReadWrite permissions.

Since this web app uses OAuth 2's implicit grant flow, you should enable it in your app's manifest in Azure. This article has details on the implicit grant flow and how to enable in Azure. In particular, you'll want to download your app's manifest in the Azure Management Portal, set the "oauth2AllowImplicitFlow" field to true, and upload the manifest to the portal.

Step 3. Fill in your clientId in app.js

You will need to specify the clientId for your app in app.js. You can get the clientId in the Azure Management Portal.

Step 4. Run your application

If you are using Visual Studio, build and run your application. To test your application locally you will also need to add the local URL as a reply URL in your app's page in the Azure Management Portal. The sample is set to run at localhost:55407.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

Sample web app for the OneNote Class Notebook APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published