Skip to main content
OneNote The OneNote app provides read/write access to Microsoft OneNote through the Microsoft Graph v1.0 REST API. It can be consumed two ways: as a remote MCP server that Agent Factory agents call as tools, or as a Builder app whose instructions you call directly from DSUL. The MCP surface groups every operation into five entity tools (notebooks, sectionGroups, sections, pages, locations), each driven by an action argument, and runs in the tenant app-instance context (it resolves the installing workspace’s own credentials). The same tree is also exposed as MCP Resources, so a knowledge base can be pointed at a whole notebook or at a single section. Authentication is always delegated — Microsoft withdrew app-only authentication from the Graph OneNote API on 31 March 2025 — so Microsoft 365 permissions apply exactly as they stand: a caller reads and writes only what their own account could. Three modes are available:
  • Per-user OAuth2 with a central client (oauthCentral, default): one Microsoft Entra application is registered once by the platform maintainer; every end user signs in with their own Microsoft 365 account. Nothing to register per tenant — each workspace installs the app and clicks Connect.
  • Per-user OAuth2 with a tenant client (oauth): paste your own Entra client ID/secret in the connector configuration app. Each user signs in with their own account against your application (PKCE authorization-code flow).
  • Direct access token (accessToken): a caller-managed Graph access token, used as-is with no exchange.

Read the whole tree

Browse notebooks, section groups and sections across personal, group and SharePoint site locations, and read a page’s full text as Markdown

Write back

Create notebooks, section groups, sections and pages, patch a page’s content, delete a page and copy items between containers

Feed a knowledge base

The same tree is published as MCP Resources, so a whole notebook or a single section can be indexed and queried semantically
OneNote content is a four-level tree, and every tool argument follows it:

Who is this for?

This connector is used by four different roles. Jump to the section that matches yours; each one is self-contained.

Agent builder

You build agents in Agent Factory and want them to read and write OneNote. → Agent builder tab.

Knowledge base owner

You want OneNote pages indexed and searchable semantically, kept up to date. → Knowledge base (sync) tab.

Platform admin

You run the platform and set up the shared Microsoft Entra application once for everyone. → Platform admin setup accordion below.

Workspace builder

You write Builder automations (DSUL) that call OneNote operations directly. → Workspace builder tab.

Prerequisites (Microsoft side)

  • A Microsoft 365 account with OneNote (personal OneDrive notebooks, Microsoft 365 group / Teams notebooks and SharePoint site notebooks are all reachable).
  • A Microsoft Entra application registration (single- or multi-tenant), with the Microsoft Graph delegated permissions the connector requests. There is no application-permission path: app-only authentication was removed from the Graph OneNote API on 31 March 2025, so a client-credentials configuration is refused with an explicit message rather than silently failing on Graph.
  • Admin consent may be required in your tenant for Notes.* and Sites.Read.All, depending on your consent policy.
The OAuth scopes requested by default are:
offline_access is what makes Entra issue a refresh token; without it, scheduled knowledge-base syncs for that user cannot run. Sites.Read.All is only needed to locate SharePoint site notebooks (locations tool); drop it if you only work with personal and group notebooks.
Goal: two one-time tasks: (1) configure the shared central Entra application so every workspace lets its users sign in with their own Microsoft 365 account, and (2) expose OneNote as a reusable capability in AI Governance so agent builders can pick it without pasting endpoint URLs.

1. Configure the connector

1

Register the application in Microsoft Entra

In the Entra admin center open Identity > Applications > App registrations > New registration. Add a Web redirect URI pointing at the core workspace callback:
(e.g. https://api.studio.prisme.ai/v2/workspaces/Kk431UO/webhooks/oauthCallback on production, where Kk431UO is the id of the one-note core workspace).
Use the workspace raw id, not the slug:one-note form. Microsoft Entra rejects the : in a redirect URI whatever the encoding, and truncates the URI before it — the sign-in then fails with a redirect-URI mismatch that gives no hint about the cause.
Under API permissions, add the Microsoft Graph delegated permissions listed in Prerequisites and grant admin consent. Under Certificates & secrets, create a client secret. Keep the Application (client) ID, the client secret and, for a single-tenant application, the directory (tenant) ID.
2

Enter the credentials through the configuration app

Open the central one-note workspace and launch its Configuration app at <studio>/apps/one-note (e.g. https://studio.prisme.ai/apps/one-note), also linked as Configuration app on the installed instance. Its Maintainer view asks for the Client ID, the client secret, the tenant and the default scopes; the app stores them in the core workspace’s secrets for you. Do not edit Studio’s raw Secrets by hand. These credentials stay in the one-note workspace and are never exposed to tenants or end users: the token exchange is proxied through the core centralTokenExchange webhook, so the client secret never leaves the core workspace.
3

Tell workspaces to use the central client

Each consuming workspace selects auth mode oauthCentral in the connector configuration app (no client id/secret to enter on their side). Their users then just click Connect. A tenant may narrow the scopes it asks for, but never widen them beyond the scopes the central application itself declares.

2. Declare the capability in AI Governance

Generic connectors (broad tool surfaces meant to be shared across many agents, like OneNote) are best exposed as a named capability in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.
1

Open AI Governance > Capabilities

Create (or edit) the OneNote capability.
2

Point it at the MCP endpoint

Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:
The agent_id in the scope is what lets the connector identify and authorize the calling agent.
3

Make it available to agent builders

Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization’s existing roles; there is no per-capability role grant.
4

Smoke-test

From an agent that has the capability, in a workspace configured for oauthCentral, call locations with action: "me". The user is prompted to connect once (Microsoft sign-in); subsequent calls reuse the stored token transparently and refresh it automatically. The response names the Microsoft 365 account the connector is acting as — the fastest way to confirm which identity is in play.
Declaring the capability makes the connector available; it does not by itself authorize a specific agent. This connector follows the tenant-context model: which agents may actually call it is gated per-workspace by the authorized-agents allowlist in the configuration app (see the Workspace builder tab). There is also no OAuth auth-config JSON to attach in Governance: connect / status / disconnect are handled by the connector’s own webhooks, wired automatically on install.

Agent builder

Goal: let an agent you build in Agent Factory read and write OneNote through MCP tools.
Before an agent can call the connector, a Workspace builder must have installed and configured the OneNote app in a workspace (see the Workspace builder tab), and, for the central OAuth mode, a Platform admin must have provisioned the shared Entra application (see the Platform admin setup accordion above).
This connector runs in the tenant app-instance context: your agent is authorized two ways at once — it is identified by the agent_id that Agent Factory injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The Microsoft Graph token itself is resolved server-side from the configured auth mode, and it is always the signed-in user’s own token: the agent sees exactly the notebooks that person can already open, no more.
1

Install and configure the connector in your workspace

Follow the Workspace builder tab: install OneNote in your workspace, open its Configuration app, choose the auth mode and connect a Microsoft 365 account. The config app displays and copies the workspace’s MCP Endpoint.
2

Allowlist your agent

In that workspace’s config app, open Authorized agents and tick your agent (the Install capability button does this for you). An agent that is not listed is refused with an explicit message.
3

Add the MCP capability to your agent

In your agent, add a capability pointing at your workspace’s MCP Endpoint URL, and set its Scope to:
The agent_id is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit “agent could not be identified” message. This Scope is separate from the Microsoft Graph OAuth scopes.
4

Connect a Microsoft 365 account

On the first tool call, an unconnected user is prompted to sign in; Agent Factory surfaces a connect_url. The accessToken mode needs no interactive sign-in.
5

Brief the agent in its system prompt

Wiring the capability is not enough; the agent must know the MCP exists and when to use it. Copy-pasteable starter:
Microsoft Graph has no full-text search on OneNote. titleContains and OData $filter match titles and metadata only — never page content. An agent that must answer questions about what is written inside pages should query a knowledge base fed by this connector’s MCP Resources (see the Knowledge base (sync) tab); the live tools are for locating, reading and writing known pages.
Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its agent_id.
Restricting to read-only (least privilege). The OneNote tools cover both reads and writes (create, createPage, updateContent, delete, copy*). The requested OAuth scopes are the grant, so the connector only obtains what the Scopes field in the configuration app asks for. To allow only read access, set a read-only scope list:
With central OAuth (oauthCentral) you do not create your own Entra application; keep oauthCentral and just enter the read-only scopes — the tenant scope narrows the platform default (it can never widen it beyond what the central application declares). Write calls are then rejected by Microsoft with 403, while the connection itself stays healthy because every connection check is a read. Note this is set at the workspace level: a workspace editor can widen it again; restricting the permissions of the Entra application, or of the connected account, is the only hard guarantee.Beware of the intermediate Notes.Create scope: it allows creating a page but not updating or deleting one, and Microsoft answers 403 with error 40004 in that case.

Available Tools

Each tool takes an action argument selecting the concrete operation, plus the per-action parameters. The four content tools share scope (me — the default — group, site or user) and scopeId, which say where the notebooks live.
The write surface stops where Graph’s does. Microsoft Graph offers no delete and no rename for a notebook, a section group or a section: those methods simply do not exist. pages/delete is the only delete on the whole OneNote API. Copies are asynchronous: they answer immediately and are polled with copyStatus using the operationId returned by the copy.

Output Formats

Every tool accepts an outputFormat argument that controls the MCP response shape:
  • verbose (default): human-readable text optimized for LLM consumption
  • structured: concise machine-readable JSON in structuredContent
  • both: the text block and the structured payload together

Tool Details

pages

getContent returns the page as Markdown, headed by its title, notebook, section, section author, dates and a link to open it in OneNote. OneNote stores pages as HTML; the connector converts it (headings, lists, pipe tables) so the text chunks cleanly for retrieval.

notebooks

sections

Unlike a page, a section does carry createdBy / lastModifiedBy. Graph exposes no author on a page (only createdByAppId), so whenever a name is shown next to a page it is the section’s last modifier, and it is labelled as such — never presented as the page’s author.

locations

Use this tool first whenever the notebooks are not the signed-in user’s own: listGroups returns the ids that feed scope: group, searchSites those that feed scope: site. A site created moments ago may not be searchable yet — /sites?search= is served by the SharePoint search index, which takes minutes to hours; address it by path with getSite in the meantime.

Error Handling

Common Issues

“This agent is not authorized to use this connector”: The calling agent is not in the allowlist. Open the configuration app → Authorized agents → tick this agent (or enable Allow all agents) and Save. “The calling agent could not be identified”: The MCP capability Scope does not declare agent_id, so Agent Factory never injects the agent identity. Set the Scope to context_id,agent_id,user_id on the capability, then allow the agent in the config app. “OneNote is not connected for this user”: No per-user OAuth token. Open the configuration app (OAuth mode) and click Connect, or use the agent’s connect flow. “Microsoft token refresh failed … must reconnect”: The stored refresh token was revoked or expired. Entra rotates refresh tokens, and only issues one at all when offline_access is among the requested scopes — a connection made without it works interactively but cannot be refreshed for scheduled syncs. The user must reconnect from the config app. “Microsoft Graph not authenticated” / “OAuth is not configured”: Neither a tenant Entra application nor the central platform client is available. Set the client id/secret in the config app, or ask the platform maintainer to provision the central application. “OneNote cannot be read with an application identity”: The workspace is configured for clientCredentials. There is no such path: Microsoft withdrew app-only authentication from the Graph OneNote API on 31 March 2025. Use a delegated OAuth mode — each person connects their own Microsoft 365 account and sees exactly the notebooks they already have access to. A search for a phrase inside pages returns nothing: expected. Graph indexes no OneNote page content, so titleContains and $filter only ever match titles, names and dates. Narrow with pages/list then read with pages/getContent, or query a knowledge base fed by the connector. Pages come back untitled: a OneNote page very often has an empty title — every page created through the API without a <title> element does. The connector names such pages by a short suffix of their id when listing, and recovers the real title from the first heading of the content when reading. Always give createPage a <head><title>…</title></head>.

External Resources

Microsoft Graph OneNote API

Official reference for the OneNote resources, permissions and HTML page format on Microsoft Graph v1.0.

Tool Agents

Learn how Agent Factory agents consume MCP tools in Prisme.ai.