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

MS Graph API获取OneNote页面结果不实时问题及替代API尝试

OneNote API Issues: Stale Data & Deprecated API Authentication Problems

Microsoft Graph OneNote API Stale Data Problem

  • When calling GET https://graph.microsoft.com/v1.0/me/onenote/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc, results aren't real-time:
    • The section should contain 4 pages, but only 2 existing pages are returned.
    • Pages deleted via DELETE https://graph.microsoft.com/v1.0/me/onenote/pages/{ID} still appear in the response.
    • Retrieving HTML content for these deleted pages returns a 404 error.
  • Resolutions:
    • Allow time for Graph API sync (latency typically ranges from seconds to a few minutes).
    • Filter out inactive pages by adding $filter=status eq 'active' to your query string.
    • Disable any local caching in your application that might be serving stale data.
    • Confirm the DELETE operation succeeded: check for a 204 No Content response and verify the page is removed from the OneNote desktop/mobile client.

Deprecated OneNote API (Scheduled for Nov 2022 Shutdown) Issues

  • Outdated Documentation: The Microsoft Account Developer Center referenced in old docs now redirects to Azure Portal.
  • Missing Permission: The office.onenote_update permission noted in docs doesn't exist; only Microsoft Graph/OneNote permissions are available.
  • Authentication Errors: After adding Notes.ReadWrite permission and re-authenticating:
    • GET https://www.onenote.com/api/v1.0/me/notes/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc returns 401 Unauthorized.
    • GET https://www.onenote.com/api/v1.0/notebooks returns 401 Unauthorized.
    • GET https://www.onenote.com/api/v1.0/me/notebooks returns 404 Not Found.
  • Resolutions:
    • Migrate fully to Microsoft Graph API since the deprecated OneNote API is no longer supported.
    • If temporary use is necessary:
      • Use Azure AD OAuth 2.0 endpoints for authentication (replacing the outdated dev center).
      • Validate your access token includes the Notes.ReadWrite scope (use a token decoder tool to inspect claims).
      • Adjust endpoint paths: the me prefix may not be valid for the deprecated API; try removing it for notebook/section queries.

内容的提问来源于stack exchange,提问作者Sean DeNigris

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.14 11:30:56