Skip to main content
OneNoteVFS mounts OneNote notebooks read only through Microsoft Graph: each notebook, section group and section becomes a folder, and each page the HTML OneNote renders for it. Set up a token as in OneNote setup.

Install

Configure

With no user_id, the mount is the signed-in user’s notebooks (/me).

Fields

str | callable
required
secret
Microsoft Graph bearer token, or a callable that returns one; it is called for each request and again after a 401.
str
Full Graph service root, version segment included, for a private endpoint or a test server; Microsoft serves the OneNote API only in the worldwide cloud. Unset uses https://graph.microsoft.com/v1.0.
float
default:"30"
Seconds a Graph request may wait to connect, or between two reads of its answer, before it fails; also how long a server-side copy is polled before it fails as unconfirmed.
int
default:"5"
Times a request is retried after a 429, 503 or 504 response. Each retry waits what Retry-After asks or an exponential backoff, at most 30 seconds.
str
User ID or UPN whose notebooks the mount reads, ones the signed-in user may open; unset reads the signed-in user’s.
Fields marked secret are redacted in snapshots.

Authentication

access_token is a Microsoft Graph bearer token, or a callable that returns one. A callable is called for each request and again after a 401, so a long-running mount outlives one token; a plain string lasts about an hour. The token is delegated: OneNote’s Graph API refuses app-only tokens since March 31, 2025. With Notes.Read it reads the signed-in user’s notebooks. user_id names another user, by id or UPN, whose notebooks the signed-in user may open, which takes Notes.Read.All.

Layout

  • A notebook, a section group and a section are each a folder named by its display name, with / shown as ∕. A section group nests inside its notebook or another group, to any depth.
  • A name two siblings share (a section and a section group may) carries the later one’s __<id>, and so does a folder named like a page file.
  • A page file is named <title>__<page-id>.html, the title sanitized and cut short when needed, and Untitled_Page when it has none. ls the section rather than build the name.
  • A section lists its pages flat: a subpage sits beside its parent.

Behavior

  • Read only: no command changes a notebook.
  • OneNote’s HTML: a page file is the page as Microsoft Graph renders it (GET /pages/{id}/content): a <title>, the creation time in <meta name="created">, then the page’s paragraphs, headings, lists, tables and links. A to-do item carries data-tag="to-do", and data-tag="to-do:completed" once ticked. An image points at Graph’s resource URL, which needs the token to open.
  • Listings: the root asks for every notebook with the sections and section groups directly inside it, so entering a notebook costs no request; a section group asks for its own the same way, and a section lists its pages a hundred at a time.
  • Sizes and dates: a page is listed with no size, since Graph names one only once the HTML is fetched; cat and wc read it. A page is dated when last modified, a folder likewise.
  • Service root: mounts address https://graph.microsoft.com/v1.0 unless graph_base_url names another root, given in full with its version segment.

VFS.md

The VFS.md an agent reads with OneNote mounted at /<path>.
Virtual FilesystemVFS Layout/<path>
  • <notebook>, <section group> and <section> are display names. When two siblings share a name, the later one carries __<id>, as does a name shaped like a page file (<title>__<page-id>.html).
  • A page file is the HTML OneNote answers for the page: its <title>, its creation time in <meta name="created">, then its paragraphs, headings, lists, tables and links. A to-do item carries data-tag="to-do", and data-tag="to-do:completed" once ticked.
  • A section lists its pages flat, subpages beside their parent.
  • ls a section for the names rather than building <title>; grep -r reads every page below a directory.
  • The mount is read-only.
Supported Unix Commands for VFSUnix commands work on each path as on a local filesystem, as far as the path supports them:Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.