onenote-api

“The section is read-only” when adding content to OneNote using its API

試著忘記壹切 提交于 2019-12-13 21:45:45
问题 Currently I am trying to add content to a OneNote 2013 page using the UpdatePageContent function from the OneNote API provided by the Microsoft.Office.Interop.OneNote reference. However, I always obtain the error code 0x80042001 , which is described as The XML is invalid in the documentation. Yet, I cannot understand for what reason my XML in the following simple code would be invalid. using System; using OneNote = Microsoft.Office.Interop.OneNote; namespace ConsoleApplicationOneNoteTest {

Inserting image into existing OneNote page via REST api not working

时间秒杀一切 提交于 2019-12-13 02:54:49
问题 I can insert an image when I create a new page but when I try to add an image into an existing page I end up with an image link but no image displayed. Image link only This is the request: Content-Disposition: form-data; name="Commands" { 'Target':'body', 'Action' : 'append', 'Content' : '<div data-id=testdiv1><div>Chat message with mike</div></div>' }, { 'Target':'#testdiv1', 'Action' : 'insert', 'Content' : '<img src="image1"/>' } Content-Type: image/png Content-Disposition: form-data; name

How to debug win32com call in python

流过昼夜 提交于 2019-12-12 16:44:45
问题 In order to collect output from a logging script, I would like to use onepy to add information to a OneNote 2013 notebook. Unfortunately, the method update_page_content() provided by onepy doesn't work for me. To get a deeper understanding of the problem, I switched over to C#, where many online examples for the OneNote API exist and after some trouble I managed to get the following minimalistic C# example to work: using System; using OneNote = Microsoft.Office.Interop.OneNote; class Program

How can you access “Shared” personal notebooks via rest API?

自闭症网瘾萝莉.ら 提交于 2019-12-12 03:39:10
问题 I have a shared personal notebook that I would like to access via the rest api. I'm signing in as the user with whom the notebook has been shared (shows as "personal >> xxx.onmicrosoft.com" under the "Shared with me" section of OneNote). Looking at this url: OneNote REST API I don't see the shared notebook as a personal notebook (I do see my personal notebooks): https://www.onenote.com/api/v1.0/me/notes/notebooks It doesn't show up under sharepoint site notebooks: https://www.onenote.com/api

OneNote API & Postman REST

为君一笑 提交于 2019-12-12 02:37:30
问题 I'm attempting to use the OneNote REST API. In order to test the features, I'm tyring to use Postman REST Client. I am using Postman's built in OAuth 2.0 flow with the following parameters: Authorization URL: https://login.live.com/oauth20_authorize.srf Access Token URL: https://login.live.com/oauth20_token.srf Client ID: CLIENT_ID Client Secret: CLIENT_SECRET Scope (Optional): wl.signin%20wl.basic Below you can see the setup I am using for the MS App Dashboard. I am able to get the token,

401 Unauthorized - token not being accepted

一曲冷凌霜 提交于 2019-12-11 19:17:19
问题 I'm successfully using the Graph API for a variety of things but I need to access to the OneNote API to perform student and teacher add/remove operations on Class Notebooks. When I request a token the same way that I do for Graph with the https://www.onenote.com resource it provides one but when I try to use it to access the OneNote API no matter what (valid) request I send I get 401 - "The request does not contain a valid authentication token." I've tried using the v1.0 endpoint to generate

How set onenote page as read only using onenote API

偶尔善良 提交于 2019-12-11 18:28:06
问题 I am using onenote graph API to create and update notebook,sections,pages. Know i want to make onenote page as read only using Onenote Graph API. Please suggest PATCH or POST Request url to set onenote page as read only 回答1: I think the only effective way of doing this is by creating a view only link to the Notebook. The OneNote API only allows this for section groups as described at "Create sharing links on OneNote entities" POST ../sectiongroups/{id}/GetOrCreateAnonymousSharingLink with {

Best way to use One Note API to GET specific pages in specific section in specific notebook?

倖福魔咒の 提交于 2019-12-11 10:19:33
问题 According to the OneNote API documentation, I can GET specific pages in a specific section using: ../sections/{section-id}/pages[?filter,...] ... and I can GET a specific section in a specific notebook using: ../notebooks/{notebook-id}/sections[filter,...] ... but if I try to combine these to GET specific pages in a specific section in a specific notebook, using: ../notebooks/{notebook-id}/sections/{section-id}/pages[?filter,...] ... I get: "Badly formed request in oneNoteGet() for: notebooks

Accessing shared notebooks pages and sections for Onenote for business acoount

时光怂恿深爱的人放手 提交于 2019-12-11 04:14:52
问题 I am integration onenote with my application. I am using below mentioned API to retrieve all notebooks that a user can potentially access to. https://graph.microsoft.com/v1.0/me/onenote/notebooks?includesharednotebooks=true I am able to retrieve all the notebooks owned by me and shared with me. The problem is in case on business account I am not able to further access the pages and sections which are inside shared notebooks. For all owned notebooks I can still access the pages and sections.

A query to the content of a OneNote page in Microsoft Graph returns a 10019 error

时光总嘲笑我的痴心妄想 提交于 2019-12-11 02:18:18
问题 Some pages in one section fail API calls with a 500 error. The query URL is https://graph.microsoft.com/v1.0/me/onenote/pages/{page-id}/content The response is: { "error": { "code": "10019", "message": "The service detected a request that exceeds the maximum recursive call limit and has aborted it.", "innerError": { "request-id": "7514b9c5-ffc1-4cec-82c3-ceee523a8913", "date": "2018-04-12T08:21:04" } } } I can access the pages in the OneNote apps, and I'm fairly sure the API call is correct,