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
Write back
Feed a knowledge base
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
Knowledge base owner
Platform admin
Workspace builder
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.*andSites.Read.All, depending on your consent policy.
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.
Platform admin (Governance): one-time platform setup
Platform admin (Governance): one-time platform setup
1. Configure the connector
Register the application in Microsoft Entra
https://api.studio.prisme.ai/v2/workspaces/Kk431UO/webhooks/oauthCallback on production, where Kk431UO is the id of the one-note core workspace).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.Enter the credentials through the configuration app
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.Tell workspaces to use the central client
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.Open AI Governance > Capabilities
Point it at the MCP endpoint
agent_id in the scope is what lets the connector identify and authorize the calling agent.Make it available to agent builders
Smoke-test
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.- Agent builder (Agent Factory)
- Workspace builder (DSUL)
- Knowledge base (sync)
Agent builder
Goal: let an agent you build in Agent Factory read and write OneNote through MCP tools.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.Install and configure the connector in your workspace
Allowlist your agent
Add the MCP capability to your agent
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.Connect a Microsoft 365 account
connect_url. The accessToken mode needs no interactive sign-in.Brief the agent in its system prompt
agent_id.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: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 anaction 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.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 anoutputFormat argument that controls the MCP response shape:verbose(default): human-readable text optimized for LLM consumptionstructured: concise machine-readable JSON instructuredContentboth: 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
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
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 declareagent_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>.