Id attributes are missing in OneNote page content fetched via Microsoft Graph

RakeshKumar-4431 251 Reputation points
2021-09-07T17:52:27.097+00:00

We are creating a OneNote page using the below Graph endpoint. Several id attributes are present in the HTML content of this page.

POST .. groups/{group-id}/onenote/sections/{section-id}/pages

To get the OneNote page content again, we are using the below graph end point.

GET ..groups/{group-id}/onenote/pages/{page-id}/content?includeIds=true

In the case of one of our customers, when we get the page content, we don't see those id attributes that we added when creating the page. Other customers do not experience this problem.

We checked that we did not PATCH anything on that page before it started returning page content without id attributes.

In debugging, we noticed that if we create a OneNote page and get the page content immediately, we get the IDs back, but if we do it later, we don't.

Here are the details of the latest get request for that page content.

curl $'https://graph.microsoft.com/v1.0/groups/e07ccbcc-3464-4777-aa3a-466cc0db328c/onenote/pages/1-1ea50c06f867479a84ffa6a1f3710e0d\u002157-7b03c43d-87ff-4692-8664-d3a42822b7ed/content?includeIds=true' \
  -H 'Connection: keep-alive' \
  -H 'Cache-Control: no-cache' \
  -H 'sec-ch-ua: "Chromium";v="92", " Not A;Brand";v="99", "Microsoft Edge";v="92"' \
  -H 'Pragma: no-cache' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'Authorization: Bearer 
  -H 'client-request-id: 95a44839-0407-4fe7-b497-294c9375ea1f' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 Edg/92.0.902.84' \
  -H 'If-Modified-Since: Mon: 26 Jul 1997 05:00:00 GMT' \
  -H 'Origin: https://app.boarddecisions.com' \
  -H 'Sec-Fetch-Site: cross-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: https://app.boarddecisions.com/' \
  -H 'Accept-Language: en-GB,en;q=0.9,en-US;q=0.8' \
  --compressed
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,677 questions
{count} vote