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
userId, the mount is the signed-in user’s notebooks (/me).
Fields
Microsoft Graph bearer token, or a function (sync or async) that returns one; it is called for each request and again after a
401.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.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.
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.User ID or UPN whose notebooks the mount reads, ones the signed-in user may open; unset reads the signed-in user’s.
Authentication
accessToken is a Microsoft Graph bearer token, or a function (sync or
async) that returns one. A function 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.
userId 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, andUntitled_Pagewhen it has none.lsthe 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 carriesdata-tag="to-do", anddata-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;
catandwcread it. A page is dated when last modified, a folder likewise. - Service root: mounts address
https://graph.microsoft.com/v1.0unlessgraphBaseUrlnames another root, given in full with its version segment.
VFS.md
The VFS.md an agent reads with OneNote mounted at/<path>.
- Rendered
- Raw
Virtual Filesystem
VFS 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 carriesdata-tag="to-do", anddata-tag="to-do:completed"once ticked. - A section lists its pages flat, subpages beside their parent.
lsa section for the names rather than building<title>;grep -rreads every page below a directory.- The mount is read-only.
Limitations of Unix Commands for VFSWhere a path differs from a local filesystem:
Run
man <cmd> or <cmd> --help for one command’s usage.