HomeAboutAll Posts

Broken OneNote Notebook Shows as Folders after Migration to SharePoint Online

By Denis Molodtsov
Published in SharePoint
February 25, 2026
1 min read
Broken OneNote Notebook Shows as Folders after Migration to SharePoint Online

Table Of Contents

01
A Monday Morning Migration Panic (A Personal Story)
02
The Problem
03
The Fix
04
Conclusion

A Monday Morning Migration Panic (A Personal Story)

I remember migrating a massive SharePoint Server site for a client to Microsoft 365. The weekend migration completed without many errors, and I was feeling pretty good about it. That is, until Monday morning at 8:00 AM when the engineering team called the IT support, panicking because their critical OneNote notebook was replaced by “just a bunch of weird files and folders.”

I spent hours digging into the issue trying to find a fix. It turned out the files were perfectly fine; SharePoint Online just needed a metadata nudge to recognize the folder as a notebook. The lesson I learned the hard way? Always audit your file types pre and post-migration, especially problematic formats like OneNote, and never assume a successful file copy means a functional application!

The Problem

Frequently, after a migration to SharePoint Online, you can end up in a situation where your OneNote notebooks appear as folders:

Why does it show as a folder?
Why does it show as a folder?

If you open this folder, you will see the .onetoc2 file and at least one .one file:

Contents of the OneNote folder.
Contents of the OneNote folder.

This happens because the HTML File Type column is not set to OneNote.Notebook. This can be easily fixed using PnP PowerShell.

The Fix

Open PowerShell and run the following command:

powershell
Connect-PnPOnline -url https://[tenant].sharepoint.com/sites/Your-Site -UseWebLogin
Set-PnPListItem -List "Documents" -Identity 46 -values @{"HTML_x0020_File_x0020_Type"="OneNote.Notebook"}

Make sure to replace the URL, list name, and item ID with the appropriate values for your environment. Identity refers to the folder ID. You can find it by updading the list view to include the ID column. After running this command, the OneNote notebook should display correctly in SharePoint Online.

One note fixed
One note fixed

By updating the HTML_x0020_File_x0020_Type via PowerShell, SharePoint automatically cascades the changes to the folder’s internal ProgID and flips the WOPI rendering flag so it opens in the browser.

Conclusion

So as you can see, the fix is very simple. However, the devil is in the details. In many cases, OneNote notebooks contain section groups, which are also presented as nested subfolders. Each of these subfolders will likely have an associated .onetoc2 index file.

If you are writing a script to automate this fix at scale, it is very important to find the topmost folder that contains the topmost .onetoc2 file and only target that with your PowerShell script. Taking the time to validate this hierarchy will save you from fracturing a cohesive notebook into multiple broken pieces. Happy migrating!


Tags

OneNoteSharePointSharePoint Online

Share

Previous Article
Free SharePoint Backup. Getting Started with Veeam for Microsoft 365
Denis Molodtsov

Denis Molodtsov

Microsoft 365 Architect

Related Posts

Free SharePoint Backup. Getting Started with Veeam for Microsoft 365
Free SharePoint Backup. Getting Started with Veeam for Microsoft 365
December 23, 2025
3 min

Quick Links

AboutAll Posts

Social Media