0

My use case is to integrate onenote in our application. I am using document mentioned at https://msdn.microsoft.com/en-us/office/office365/howto/onenote-copy.

To get notebooks some url's are mentioned like -

Construct the request URI

To construct the request URI, start with the service root URL for your platform:

Notebooks on OneDrive for Business /me/notes/ /users/{id}/notes/

SharePoint site notebooks /myOrganization/siteCollections/{id}/sites/{id}/notes/

Unified group notebooks /myOrganization/groups/{id}/notes/

Out of which I am able to successfully access https://www.onenote.com/api/v1.0/me/notes/.

What about id's in other api's. From where I can get groupId or userId of user who has shared content. Can anyone share link for documentation which mention details about all these things.

Any leads would be appreciated.

Purva
  • 37
  • 2
  • 1
    You can use Microsoft Graph endpoints to obtain groupId and userId. Please refer to: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/group_list https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list – Manjusha Jun 29 '17 at 21:59
  • Thanks for your response.I still have few issues as - 1. Is there any other way to get group details as when I integrate OneNote in my application I am not aware of user who is admin for any organization 2. From where I will get user details who has shared content with my user. To access shared content we need to use /users/{id}/notes/ where id is of user sharing the content. – Purva Jul 01 '17 at 10:56

1 Answers1

0

For retrieving shared OneNote content, you can use the GetRecentNotebooks API (https://blogs.msdn.microsoft.com/onenotedev/2017/04/21/get-recent-notebooks-api/) or /me/notes/notebooks?includesharednotebooks=true

Manjusha
  • 538
  • 2
  • 4
  • As a general rule, it's better to also include a brief explanation/summary/code snippet of the linked page content. – Paolo Jul 03 '17 at 02:37
  • @Manjusha - /me/notes/notebooks?includesharednotebooks=true endpoint gives me only few recent notebooks and notebook id and other details are not shared. Can you please just confirm if it is possible to get complete details of shared content without having groupId or userId of the who has shared content with us. – Purva Jul 04 '17 at 04:38
  • If your notebook is not in the GetRecentNotebooks list or in the ?includesharednotebooks list, then you will need the userId or the groupId to retrieve the shared notebook. Alternatively, you could open the shared notebook in OneNote online (this is a one-time thing) and that notebook will be returned in the GetRecentNotebooks list. – Manjusha Jul 05 '17 at 18:52
  • However, the notebooks returned by the GetRecentNotebooks API does not have the notebook Id. So if you need shared notebooks with all details, you will need the userId or the groupId of the shared notebook – Manjusha Jul 05 '17 at 18:57