-2

I need to be able to create OneNote notes/sections/notebooks and to share them between a certain list of users from a Asp .NET MVC website. How could I do that?

Marius
  • 1
  • 1
    You'll improve your odds of getting help if you can show an attempt and explain where you're having trouble. – BSMP Jan 14 '16 at 15:56
  • After spending some time in searching for support for sharing in the API, I came to a dead end. For now the OneNote API offers support for creating, updating notes, but no sharing yet. Now I'm starting to consider other solutions. – Marius Jan 19 '16 at 12:49

2 Answers2

-1

We can use OneNote API to manipulate the content of OneNote. Then we need to share the OneNote with users manually. For example, we can get a link then share the link in the MVC web site.

Fei Xue
  • 14,369
  • 1
  • 19
  • 27
-1

This is possible using the ONEDRIVE API.

You can create a sharing link for a sharepoint item with a POST request as described at https://graph.microsoft.io/en-us/docs/api-reference/beta/api/item_createlink

For example:

POST /drive/root:/{item-path}:/microsoft.graph.createLink Content-type: application/json

{
    "type": "view",
    "scope": "anonymous"
}

will create a guest link to the OneNote notebook with read access.

You have to enable this in Sharepoint admin centre as per this link:

https://support.office.com/en-us/article/Manage-external-sharing-for-your-SharePoint-Online-environment-c8a462eb-0723-4b0b-8d0a-70feafe4be85?ui=en-US&rs=en-US&ad=US

Termininja
  • 6,620
  • 12
  • 48
  • 49
codeye
  • 607
  • 3
  • 10