How can I get OneNote Content using oneNoteClientUrl or oneNoteWebUrl using Graph API?

Zhonglin Sun 1 Reputation point Microsoft Employee
2022-11-08T09:48:49.06+00:00

Hi,

I want to know how to get onenote object/content using oneNoteClientUrl or oneNoteWebUrl in GraphAPI.
Currently I have a large number of onenote pages urls, and I want to get their contents.
All I can find is the /groups/{id}/onenote/pages api in the doc, however the pageid and sectionid in the onenote urls are not helpful to access the API.
So I want to know if there is any other approach to get onenote content in Graph API.

Thanks

Microsoft Graph Notes API
Microsoft Graph Notes API
A Microsoft API that lets your app get authorized access to a user's OneNote notebooks, sections, and pages in a personal or organization account.
48 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Zehui Yao_MSFT 4,001 Reputation points Microsoft Vendor
    2022-11-09T03:13:01.07+00:00

    Hi @Zhonglin Sun , you can use the GET /onenote/pages/{id}/content endpoint the get the HTML content of a page. Hope this helps, best wishes.

    258502-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.