I'm swapping out my usage of the old OneDrive SDK to programmatically access the contents of OneNote in a UWP app, and I've begun using the Microsoft Graph for .NET SDK. One of the things I need to do is get a specific page's content. Currently, I'm attempting to do so like this:
await _graphClient.Me.Onenote.Pages
.Request()
.Filter("tolower(title) eq 'shopping list'")
.GetAsync();
...which works, and gets me all the pages in my notebook with the title of "shopping list". However, all of those pages have a null
Content
property, leaving me unable to get the HTML content of those pages. I can verify that at least one of these pages does, in fact, have content in the OneNote application.
I've read through the documentation for the SDK, and it appears that I should just be getting a Stream
back without any further action. Is there a step I'm missing, or am I using the API incorrectly?