When I load pages via
https://graph.microsoft.com/v1.0/me/onenote/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc
the results are not up-to-date, even though changes have been synced across other devices.
There should be 4 pages in the section. This is what is in the response:
- two existing pages (two are missing)
- several other pages that were previously deleted, but when I try to fetch the HTML contents, I get a 404. The pages were deleted via
DELETE https://graph.microsoft.com/v1.0/me/onenote/pages/{ID}per the docs
Does it work via the OneNote API?
Per @codeye's suggestion (see comments), I'm trying to access the pages via the one note API. It seems unclear whether this is still possible:
- The API is deprecated and scheduled to sunset November 2022.
- The docs refer to registering the application in the Microsoft account Developer Center, which appears to be obsolete and points back to the Azure portal
- Later in the same doc, they refer to permissions like
office.onenote_updatethat no longer seem to exist i.e. I can't find them in the Azure Portal. I do see permissions with the same name from two places:Microsoft GraphandOneNote- perhaps the permissions have been renamed?
- However, after adding
One Note->Notes.ReadWrite, logging out and reauthenticating, I'm still getting HTTP errors on onenote.com URLs like: - 401 from
https://www.onenote.com/api/v1.0/me/notes/sections/{ID}/pages?$top=100&$orderby=createdDateTime%20desc(as @codeye suggested below, tried with and without query parameters) - 401 from
https://www.onenote.com/api/v1.0/notebooks(URL from the docs - 404 from
https://www.onenote.com/api/v1.0/me/notebooks(same URL as previous, but withme/segment added