1
votes

I'm using consumer OneNote in this scenario.

I have been querying my OneNote pages across a number of Notebooks using Graph with some success, but I've run into a strange issue. I'm note sure if it's a quirk in Graph or my Notebooks. I've reproduced the problem using Graph Explorer.

For example, If I issue the following request using Graph Explorer:

https://graph.microsoft.com/v1.0/me/onenote/pages?$top=100&$filter=id+eq+'0-fe674713edf84357871dbc179dfd924c!1-816F7725BEF00A5F!731388'

then I get a JSON response with the 'value' full of useful data.

If I issue the following request using Graph explorer:

https://graph.microsoft.com/v1.0/me/onenote/pages?$top=100&$filter=id+eq+'0-1f9aa8a73e9a4f14b4daa7762b5aa530!42-816F7725BEF00A5F!665027'

then I get a JSON response with an empty 'value'. All I've done is changed one known good ID for another known good ID.

I can:

  • Access both pages from Graph Explorer using a direct URL with the IDs used above
  • Access both pages using OneNote web app and Windows 10 version
  • Search for the 'lost' pages by title in the OneNote user interface successfully

It doesn't seem to matter what attribute of the pages I search for, the result is the same. Interestingly this only appears to affect pages from a certain point in one Notebook onward. The affected pages look OK in OneNote and load in both Web and Windows 10 version without problems.

I can create new pages in the Notebook containing the problem pages, but the new pages don't show up when I try to search for them using Graph.

Has anyone got a suggestion as to what I should try next?

EDIT: New pages created in the problem Notebook do appear when searched for, it appears I was too impatient. The existing pages still cannot be found.

1
Are you able to see the "missing" page if you don't apply a $filter? In other words, is the filter failing or the page just doesn't get returned?Marc LaFleur
No, none of the missing pages turn up when I list without a $filter. It looks like I'm only getting 1000 pages back though, even when I use paging. Not sure how a limit on query results would affect a query only designed to return one page.Stuart Squibb
If I search the section pages collection then the missing pages are found - using https://graph.microsoft.com/v1.0/users/me/onenote/sections/0-816F7725BEF00A5F!665027/pagesStuart Squibb
I'd try without the $top as well. Top has been known to behave oddly in the past. Also, since you're filtering by an id, there should be only 1 result.Marc LaFleur

1 Answers

0
votes

If the filtered page is not in the top 100 results, the response will be empty