0
votes

I have a use case where I need to poll the OneNote API approximately every minute in order to respond to text added to pages by the user.

(Aside: I'd LOVE to use webhooks to get notifications only when something changes, but that's only supported for consumer notebooks at this time, as far as I can tell.)

Polling with this frequency works for a few users (5 or so), but then, with more users who authorized the same Microsoft application, the app seems to hit an application-level rate limit and begins receiving 429 Too Many Requests responses.

How can I ensure polling will still work as the number of users grows? And are there any rate limits that can be made public or shared in confidence for valid use cases?

1
You can submit an request in the user voice or contact the official support. The rate limit cannot fixed by coding now.Seiya Su
@SeiyaSu thank you. According to developer.microsoft.com/en-us/graph/support, Stack Overflow does seem to be the channel for Graph API "official support", no? Is there another channel I should use?jgaul
If you have see developer.microsoft.com/en-us/graph/support, you will see it just redirect us to UserVoice(Feature request) or StackOverflow(question) to, so no other official support channel now.Some PG guys will answer the question in StackOverflow tooSeiya Su
Since OneNote notebooks are folders and sections are files, is it possible to register for OneDrive webhooks and on receiving a notification only poll pages in the updated section?codeye

1 Answers

0
votes

So it is possible to register for webhooks on the sharepoint notebooks as onedrive items - as a notebook page gets updated the notificationUrl fires and you can then using delta calls to determine which sections (section.one files) have been updated.
I would then use the onenote-api to get the pages in the updated notebook sections
GET https://www.onenote.com/api/v1.0/me/notes/sections/{id}/pages

An alternative would be to treat the sharepoint drive as a webdav server and use the propfind method with the getlastmodified property to poll the drive determine which sections of various notebooks have been updated.

But I agree it would be easier if onenote webhooks were extended to sharepoint.