You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于MS-Graph OneNote API是否支持设置分区内页面层级与顺序属性的问询

MS Graph OneNote API: Setting Page Level and Order Properties

Great question! Let's break down what's currently possible and share workarounds you can use right now:

Current API Limitation

As you've observed, neither the v1.0 nor Beta versions of the MS Graph OneNote API support directly writing to the level or order properties of pages within a section. The Beta endpoint only exposes these properties for read operations (via GET /me/onenote/sections/{section-id}/pages), but there’s no PATCH endpoint or dedicated method to modify them directly.

Workarounds to Achieve Similar Results

While direct writes aren’t available, you can mimic the desired behavior using existing API capabilities:

Adjusting Page Level (Hierarchy)

OneNote natively determines a page’s level based on indentation in the page title. You can leverage this by updating the page’s title with tab characters (\t) to set the desired hierarchy:

  • For a level 1 page (indented once), prepend one \t to the title
  • For level 2, prepend two \t characters, and so on

Use the PATCH endpoint to update the title:

PATCH /me/onenote/pages/{page-id}
Content-Type: application/json

{
  "title": "\tMy Indented Page Title"
}

After updating, OneNote will automatically set the corresponding level property, which you can verify with a subsequent GET request.

Adjusting Page Order

There’s no direct way to set a page’s order value via API, but you can indirectly control page sequence by moving pages strategically:

  1. Use the POST /me/onenote/sections/{target-section-id}/pages/move endpoint to transfer pages between sections
  2. OneNote appends moved pages to the end of the target section. So to reorder pages, move them to a temporary section first, then move them back to the original section in your desired sequence. For example:
    • If you want pages in the order Page B → Page A → Page C, move Page A to a temp section first, then move Page B to the target section, then Page A back, then Page C (if needed)

This method is a bit manual, but it works reliably for small sets of pages.

Future Updates

Many developers have requested direct write support for level and order properties in Microsoft’s feedback forums. Keep an eye on the Beta API’s release notes—Microsoft often rolls out new features there first before promoting them to v1.0.


内容的提问来源于stack exchange,提问作者Michael Lynch

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 09:04:04