1
votes

I am trying out the OneNote APIs on the Graph Explorer. I logged into my company account and clicked the GET request under "Sample queries > OneNote > my pages". After a while, on the right panel where the result was displayed, I got the following in the "Response Preview" together with a "Unprocessable Entity - 422 - 6580ms" error box:

{
    "error": {
        "code": "20258",
        "message": "Sync of this section is not supported. Detailed error information: Getting Section",
        "innerError": {
            "date": "2020-06-22T19:44:16",
            "request-id": "cc019b4e-32fd-438a-b8ab-480b8a493784"
        }
    }
}

Additional information:

  • The 'my notebooks' and 'my sections' APIs are both working.
  • I am aware of this post, but the situation is not applicable.
  • My company has recently gone through a network content to OneDrive migration, which I am not sure if is relevant to this issue.
  • I notice that I can access a 'My Notebook" note book from the APP/web APP book list, which is not listed under the OneDrive/Notebooks folder. In addition, this "My Notebook" is different from another note book called "My Notebook @ Company".
  • There is a 'MyName @ Company' notebook that I have already opened in the 'OneNote for Windows 10' app. However, when I click the 'More Notebooks...' link, I can see another notebook of the same name listed, whose last used is a month ago, definitely not the last time I edited the notebook already in the app. If I check this same-name notebook and try to open, I get an error saying 'Sorry, we couldn't open the notes that you were looking for. OneNote may still be syncing them, you may not have permission to open them, or they may have been moved or deleted.' I am not sure if this is the same cause to the API query issue, because it also talks about syncing and feels like some corrupted state. The notebook has a sharepoint link like this 'https://company-my.sharepoint.com/personal/myname_company_com/Documents/MyName @ Company', which I couldn't really open.

Anyone from Microsoft can help?

1
Later, I found that the "My Notebook" notebook (not the "My Notebook @ Company" one) was located under OneDrive > Documents > OneNote Notebooks (instead of OneDrive > Notebooks). I moved "My Notebook" to OneDrive > Notebooks, but that didn't fix the issue.DXZ
I got rid of the un-openable "MyName @ Company" entry from the more notebooks list by following this reddit post. However, this is not fixing the issue in the question.DXZ

1 Answers

1
votes

After trying the pagesUrl of every section I queried from Graph Explorer, I finally found the issue. One of the sections has a null value for its parentNotebook field. Running its pagesUrl in Graph Explorer gives the same error as simply running the all pages query. This section actually belongs to a "Quick Notes.one" notebook (I figured this out by looking into its links > oneNoteClientUrl | oneNoteWebUrl field that contains the notebook name). So this is a section of a non-web-based notebook. This notebook is automatically created by the OneNote 2016 desktop app when you open the Quick Notes notebook in it. After deleting the "Quick Notes.one" file from OneDrive, the page query goes well. When it is created again, it breaks the query. The issue has nothing to do with which folder you put the *.one notebook in. I tried both OneDrive > Notebooks, OneDrive > Documents > OneNote Notebooks, and even OneDrive > Desktop. As long as there is a *.one notebook file in a OneDrive directory, the query would just fail.