OneNote Markdown Exporter

Export your Microsoft 365 OneNote notebooks into clean, GitHub‑Flavored Markdown — with hierarchy, metadata, images, and attachments preserved — using the Microsoft Graph API.
Because your notes deserve better than being trapped in a proprietary format forever.
🚀 What This Tool Does
- Authenticates via Microsoft Graph (delegated user auth)
- Walks your entire OneNote hierarchy (notebooks → sections → pages)
- Downloads page content as HTML
- Converts it to GitHub‑Flavored Markdown
- Saves images and attachments
- Writes YAML front matter for easy static‑site or GitHub‑wiki use
- Supports incremental exports so you can run it again without reprocessing everything
If you have ever thought, “Why is there no official OneNote export tool?” — this is that tool.
📦 Prerequisites
- .NET 8 SDK
- A Microsoft 365 account with OneNote content
- Your OneNote notebooks are synchronized to OneDrive
- An Azure AD app registration (instructions below)
- (Optional) Pandoc (pandoc.org in Bing) if you want the heavyweight HTML→Markdown conversion engine
If that has not scared you off, you can get it from GitHub.
🎉 Final Notes
This project exists because exporting OneNote should not require ritual sacrifice, manual copy‑paste, or a PhD in patience. If this tool saves you even one hour of your life, consider starring the repo — or telling someone else who is trapped in OneNote purgatory.