Implement change detection for OneNote using polling and delta queries (webhooks decommissioned June 2023).
Use when building real-time sync, change monitoring, or event-driven OneNote integrations.
Trigger with "onenote changes", "onenote polling", "onenote sync", "onenote delta query".
Instrucciones de origen · Vista previa de solo lectura
name
onenote-webhooks-events
description
Implement change detection for OneNote using polling and delta queries (webhooks decommissioned June 2023).
Use when building real-time sync, change monitoring, or event-driven OneNote integrations.
Trigger with "onenote changes", "onenote polling", "onenote sync", "onenote delta query".
OneNote webhooks were decommissioned June 16, 2023. The Graph subscription API (POST /subscriptions with changeType: "updated" on OneNote resources) returns 400 Bad Request. Unlike Outlook mail, calendar, and OneDrive — which still support push notifications — OneNote has no webhook replacement. You must poll.
This skill implements efficient change detection for OneNote using lastModifiedDateTime comparisons, delta query patterns, and rate-limit-aware polling intervals. The approach balances freshness (detecting changes within minutes) against the 600 requests/minute per-user rate limit.
Key pain points addressed:
Subscription API for OneNote resources returns 400 — do not attempt it
Delta queries (/me/onenote/pages/delta) are not officially documented but work on some tenants
Polling must stay within rate budget (600/min per user, 10,000/10min per tenant)
Change detection requires comparing timestamps, not content diffs (output HTML is unstable)
Prerequisites
Azure app registration with delegated permissions: Notes.Read or Notes.ReadWrite
App-only auth deprecated March 31, 2025 — use delegated auth only
A persistent store for tracking last-seen timestamps (Redis, SQLite, file system)
Instructions
Step 1 — Understand Why Webhooks Do Not Work
// DO NOT DO THIS — it will return 400 Bad Request// OneNote webhooks decommissioned June 16, 2023const subscription = await client.api("/subscriptions").post({
changeType: "updated",
notificationUrl: "https://yourapp.com/webhooks/onenote",
resource: "/me/onenote/pages",
: (.() + ).(),
});
// NOT SUPPORTED
expirationDateTime
new
Date
Date
now
3600000
toISOString
// Error: "Subscription validation request failed. Resource not found."
For comparison, these Graph resources still support webhooks: Outlook messages, calendar events, OneDrive files, Teams messages, Planner tasks. OneNote is the notable exception.
With a 600 requests/minute per-user limit, plan your polling capacity:
Sections Monitored
Poll Interval
Requests/Min
Budget Used
5
30s
10
1.7%
20
30s
40
6.7%
50
60s
50
8.3%
100
60s
100
16.7%
200
120s
100
16.7%
Reserve at least 50% of your rate budget for user-initiated operations (CRUD, search). If monitoring 100+ sections, increase the poll interval to 120s or use the tiered approach below.
Step 4 — Tiered Polling (Prioritize Active Sections)
Not all sections change equally. Poll recently-active sections more frequently: