Accessing Shared OneNote Notebooks – Key Differences Between OneDrive and SharePoint, Limitations, and Recommendations
When integrating Microsoft OneNote into applications or services, accessing shared notebooks can be tricky — especially when users collaborate via Teams or store notebooks in different Microsoft 365 locations. This guide outlines the key differences between OneDrive and SharePoint, highlights API-related limitations, and provides recommendations for developers and administrators.
1. OneDrive vs. SharePoint: Why the Storage Location Matters
Although both OneDrive and SharePoint use the underlying SharePoint infrastructure, the way access is granted and handled via Microsoft Graph API is fundamentally different.
🔒 OneDrive (Personal Storage)
-
OneDrive is essentially a personal SharePoint Site for each user. However, Microsoft uses dedicated endpoints (e.g.,
/me/drive/
) for accessing its contents. -
Sharing a notebook from OneDrive with another user does not grant API access — even if the user can open it in the browser.
-
There are limited workarounds:
-
Users can explicitly grant full OneDrive access to the application (e.g., by assigning the app as a site collection administrator).
-
Alternatively, notebooks can be moved or (potentially) linked to a SharePoint Site — we are currently testing whether linking is sufficient.
-
✅ SharePoint Sites (Team Storage)
-
Notebooks stored in SharePoint Sites (e.g., from Microsoft Teams or shared document libraries) are much easier to access via the Graph API.
-
Simply sharing the notebook with the application or a service account is often enough.
-
However, permissions may take 1–3 hours to propagate to the Graph API. During that time, access attempts may result in 403 errors.
-
This also applies to notebooks created in Microsoft Teams, if they are stored in the SharePoint site associated with the team.
2. Teams Adds Ambiguity: Know Where the Notebook Lives
Teams complicates the picture:
-
Both OneDrive and SharePoint notebooks can appear in Teams.
-
A notebook shown in a Teams tab may actually reside in OneDrive, especially when created through personal chats or when defaults are not adjusted.
-
Notebooks created in Teams do not always reside in the associated SharePoint site.
-
For example, a user creating a notebook in a private chat might unknowingly store it in their personal OneDrive.
-
Even if a notebook is visible and shareable inside Teams, it may not be accessible via the Graph API unless stored properly.
-
To determine where a notebook is stored, users can inspect the notebook properties or use the OneNote or Microsoft 365 web interface to locate the underlying storage path.
3. API Limitation: The 20,000-Item Bug
Regardless of whether notebooks are stored in OneDrive or SharePoint, a major limitation can block access:
-
Microsoft enforces internal item count limits in document libraries. Exceeding these can break API access to OneNote notebooks entirely.
-
Reported thresholds include 5,000, 10,000, and 20,000 items, depending on file types and metadata usage.
-
This is a known issue, and we are currently in contact with Microsoft for clarification and possible mitigation strategies.
-
Microsoft provides an internal diagnostic tool to help investigate item count issues.
⚠️ If the containing document library grows too large, even correctly shared notebooks may become completely inaccessible via API, despite being available in the browser.
4. Summary and Recommendations
Scenario | API Access | Recommended Action |
---|---|---|
OneDrive + Shared Notebook | ❌ Not sufficient | Move or link to SharePoint, or assign admin access (not recommended) |
SharePoint Site + Shared Notebook | ✅ Usually works | Wait 1–3h for permission sync if newly shared |
Teams Notebook | ❓ Depends on storage | Check whether it’s stored in SharePoint or OneDrive |
>20k Items in Library | ❌ Broken access | Reduce item count or move notebook to another library |
Best Practice: Store collaborative notebooks in SharePoint Sites and share them with the service account or app user. Avoid placing shared notebooks in OneDrive wherever possible.