After OneNote page update with Graph API images and objects on the page are not available anymore

Elena Semenenia 0 Reputation points
2024-04-10T09:30:02.1933333+00:00

I'm updating the OneNote page using MS Graph API from C# application.
First I receive page content from API. Then find required table tag. Then edit table adding some text and make PATCH request for page update using JSON like
[

{ 'target':'table:{id}',

'action':'replace',

'content':'<table>...<table/>' },

]
The problem is if there are images or objects tags inside the table, I send them without changing as received in page content. But after performing update request images and objects are not available on the page in browser.
And if I'll load page contain with API again, I see the different source link for images and an empty link for objects.
Though, images and object placed outside the updated table stay safe.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,067 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,927 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.