Skip to content

Instantly share code, notes, and snippets.

@Arefu
Created September 5, 2019 03:02
Show Gist options
  • Save Arefu/917df6cdaacb2e6a4e5d56d0868392be to your computer and use it in GitHub Desktop.
Save Arefu/917df6cdaacb2e6a4e5d56d0868392be to your computer and use it in GitHub Desktop.
Viewing Internal OneNote Files Through SharePoint

Viewing Internal OneNote Files Through SharePoint

Typically OneNote won't let you easily view files behind the NoteBook without a little bit of work on your part, I haven't managed to find any guides that detail the steps you need to take.


First off, if you're doing this to a Class NoteBook you will need to be an Owner/Teacher of the class in question before you can do this. The second step is to find what I call the "Section Name" of the NoteBook, for example in my scenario the NoteBooks are called Section_Year* E.G:

Section_2019206

So if I go to the following URL

https://<TENNANT URL>.sharepoint.com/sites/Section_2019206/SiteAssets/Forms/AllItems.aspx

I will see all the "Files" inside this Team, from here you can poke around easily all other files but the OneNote, when you open it, it opens either Online or in the OneNote app. To get around this we want to tell SharePoint we'd like to "See" the files inside it (After all OneNote is just a container)

So to "Trick" SharePoint we're going to give it a URL Encoded string of the path of the item in question (In this case our NoteBook)

?id=%2Fsites%2FSection_2019206%2FSiteAssets%2F13ENG-6-1-2019 Notebook Encoded

?id=/sites/Section_2019206/SiteAssets/13ENG-6-1-2019 Notebook Decoded

This is Saying we want to open the 13ENG-6-1-2019 Notebook file, a complete URL is

https://<TENNANT URL>.sharepoint.com/sites/Section_2019206/SiteAssets/Forms/AllItems.aspx?id=%2Fsites%2FSection_2019206%2FSiteAssets%2F13ENG-6-1-2019%20Notebook

Assuming this all made sense you should end up with a list of folders that look errily similar to what you see inside OneNote, from here you can then create new Folders and use SharePoint permissions to allow specific users to see and make changes to any number of files or folders. I'm sure using the MS Sharepoint API you could make your own wrapper to create sub-groups inside a Team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment