OneNote's create page endpoint not returning any links to the page

Prakash Verma 55 Reputation points
2024-09-13T15:21:05.47+00:00

We are utilizing Microsoft Graph's Create OneNote Page API to generate a page in a user's OneNote through our application. This endpoint typically creates the page successfully and returns the links to the newly created page in the response.

However, for some customers, the links to the page are not being returned even though the call succeeded with a 201 status code.

Below are the endpoint and request IDs for reference:

Endpoint:

POST: https://graph.microsoft.com/v1.0/me/onenote/sections/{SectionId}/pages

Response headers:


{
    "cache-control": "no-cache",
    "client-request-id": "0c0c1c4b-39e4-44b8-9003-48c8f4c728aa",
    "content-type": "application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8",
    "location": "https://graph.microsoft.com/v1.0/users/acc70163-aae8-4292-ad0d-4b9d193ee369/onenote/pages/1-a8d315e2f262406ebc5556412b7221af!131-3c62425a-f936-434b-b927-609495fb06f5",
    "preference-applied": "odata.include-annotations=*",
    "request-id": "74d74f2d-072c-42ad-8ae2-191aa2caf186"
}
OneNote
OneNote
A family of Microsoft products that enable users to capture, organize, and reuse notes electronically.
206 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,289 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yakun Huang-MSFT 6,575 Reputation points Microsoft Vendor
    2024-09-16T07:23:16.0266667+00:00

    Hi @Prakash Verma

    When tested, the endpoint works well, returns a 201 status code after a successful call, and returns a link to the page in the response body instead of the response header.

    My test results are as follows:

    Screenshot 2024-09-16 071920

    Reference documents are as follows:

    https://learn.microsoft.com/en-us/graph/api/section-post-pages?view=graph-rest-1.0&tabs=http

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


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.