UnknownError accessing pages from OneNote - microsoft-graph-api

I am connecting to Notebooks stored on SharePoint and getting "UnknownError" using the Graph API when trying to retrieve Pages.
I have no problem querying notebooks, sections or sectiongroups - that's all working, so no authentication problems or anything
Request:
https://graph.microsoft.com/v1.0/sites/{app id}/onenote/pages
Error below:
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "65721acc-f0d9-40d6-bf80-aac1507a6c2f",
"date": "2018-01-02T17:34:21"
}
}
}
Graph explorer returns this after about 30 seconds, so I'm guessing it's timing out. There are about 10 notebooks in the site I'm connecting to, which each have several hundred pages
I do only need to return 1 page at a time in almost every case. I have tried adding a $filter= at the end, but get the same problem

I would strongly recommend to get pages for each section rather than getting all the pages that the user has access to.
Please refer to the bottom 2 recommendations in this article: https://blogs.msdn.microsoft.com/onenotedev/2017/07/21/a-few-performance-tips-for-using-the-onenote-api/

Related

Why are we suddenly getting 403 on graph calls to list a team's channels?

We do run the GET call:
https://graph.microsoft.com/v1.0/teams/711fc163-0408-4649-9a30-af65a5d30b52/channels
It used to return the channels just fine, but this week it suddenly starting failing with this error:
{
"error": {
"code": "AccessDenied",
"message": "Failed to execute Skype backend request GetThreadsS2SRequest.",
"innerError": {
"request-id": "226d8e17-fa0f-4c42-8139-4776e198a3b2",
"date": "2019-08-26T19:25:10"
}
}
}
We see that the problem is happening for different teams and across different tenants. This is critical!
Thanks for reporting this issue. There was an issue going on with List Channel Graph API which has been fixed now.

Microsoft Graph: OpenWorkbookTooLarge – any way around this?

When calling the createSession or workbook/worksheets endpoint I'm getting the following error:
{
"error": {
"code": "OpenWorkbookTooLarge",
"message": "Service Unavailable.",
"innerError": {
"request-id": "c997d356-c343-44bb-b49b-fc03d7482f75",
"date": "2018-11-28T22:58:21"
}
}
}
The spreadsheet in OneDrive has only one sheet with 16 columns and about 160,000 rows. Is that too large to work with? That would be very disappointing...
Excel Online have file size limit, based on the docs and the error you get, you have trigger the limitation, maybe not file size but other one.
Workbooks that exceed 10 megabytes (MB) cannot be viewed in Excel
Online from within Microsoft SharePoint Online.
For none-dev user, they can use the PowerBI/Local Excel/PivotTable as workaround.
For devolper, there are no workaround now.
Jeez, it's even worse: 5MB
That's sad, really.

SharePoint list - provided #odata.nextLink results in Error 500

It seems there's an issue happening (at least within my tenant) when paging results from SharePoint Online lists; the URL provided in #odata.nextLink doesn't work, resulting in Error 500 (generalException).
I'm using a following query:
/beta/sites/[site URL],[site ID]/lists/[list ID]/items?expand=fields
The first page of results comes in correctly, and the #odata.nextLink property contains a following URL:
https://graph.microsoft.com/beta/sites/[site URL],[site ID]/lists/[list ID]/items?expand=fields&$skiptoken=Paged%3dTRUE%26p_ID%3d205
Unfortunately, using it results in:
{
"error": {
"code": "generalException",
"message": "An unspecified error has occurred.",
"innerError": {
"request-id": "f7e33c22-15b5-4aac-b928-31c1a2bf04ae",
"date": "2018-01-11T09:48:57"
}
}
}
This happens using both the /beta and /v1.0 endpoint.
Tested on multiple lists and sites within my tenant.
Tested without ?expand=fields
It was working perfectly before last Thursday (Jan. 11th).
The customer service for O365 is unable to help, pointing me to MSDN forums.
Thanks for bringing this to our attention Jakub. You found a regression that slipped through our testing - thankfully there was a quick solution so you should no longer reproduce the issue.

504 Gateway Timeout (UnknownError) when trying to track changes in a user's calendar

For our internal application we synchronize our user's calendars (in our Office 365 tenant) with a local "cache" in our database. We're using the new Delta Queries in Microsoft Graph to do track these changes.
Most of the calendars synchronize correctly, but for some reason there is one single calendar where we consistently hit a 504 Gateway Timeout error when attempting to request the events using the nextLink received from the first request.
First request:
GET https://graph.microsoft.com/v1.0/users/<userId>/calendars/<calendarId>/calendarView/delta?startDateTime=2017-06-10t00%3A00%3A00Z&endDateTime=2018-06-10t00%3A00%3A00Z
First response:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(event)",
"#odata.nextLink": "https://graph.microsoft.com/v1.0/users/<userId>/calendars/<calendarId>/calendarView/delta?$skiptoken=R0usmcdvmMuZCBYV0hguCGmIJqcU0n_6jVFWUlNKbXkBKYVlxLSMsISZI5sLLLJyLJF8hZIj0PURpAeP_XxydW_qbMUoFMTXjOpLa8Ta6rxMRA7Wv6IHYfjyLPcDzCbM_hKvTgq8BZaBeJv-a61mebF6X2wT4HqCAGL5lL4nLZabHk1nD9GbWJ0a4Qq0M41_GPYxEi5YNe9u1673SQ1Djw.F85xXB6GjtO7myCQCOgFvzp1G7mQB0BvuHQJyn0CICQ",
"value": [
<list of events>
]
}
Second request:
GET https://graph.microsoft.com/v1.0/users/<userId>/calendars/<calendarId>/calendarView/delta?$skiptoken=R0usmcdvmMuZCBYV0hguCGmIJqcU0n_6jVFWUlNKbXkBKYVlxLSMsISZI5sLLLJyLJF8hZIj0PURpAeP_XxydW_qbMUoFMTXjOpLa8Ta6rxMRA7Wv6IHYfjyLPcDzCbM_hKvTgq8BZaBeJv-a61mebF6X2wT4HqCAGL5lL4nLZabHk1nD9GbWJ0a4Qq0M41_GPYxEi5YNe9u1673SQ1Djw.F85xXB6GjtO7myCQCOgFvzp1G7mQB0BvuHQJyn0CICQ
Second response:
504 Gateway Timeout
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"request-id": "0784cffb-cba7-424b-be1d-74b2bfef5da1",
"date": "2017-07-10T09:11:33"
}
}
}
I've tried executing the script a few times over the last week, but the request consistently fails when using requesting the second page. Other calendars synchronize with no issues, so I don't really know how to debug these kind of issues. Is there anything we can do to resolve this issue?
I'm working with the team that owns Calendar sync to check where the latency in the stack is causing this time out. I'll post as soon as they have root caused this. I may need more info on what is special about this one Calendar encountering this issue.
Thanks,
Sri

GraphApi API error codes

I am attempting to create a interface between our web application and the GraphApi.
I am currently struggling to handle error correctly as the documentation for graph API seems to be at best incomplete. Is there a reference to full list of errors one should expect.
An example of the issue is where I make a request after my access token has expired. The error code is not on the list (graph.microsoft.io docs/overview/errors page) and in a different format (capitalization). It also seems to vary drastically from the azure error codes such as "Request_BadRequest". This was found in an MSDN article titled "Error codes and error handling | Graph API concepts".
The document states "You may use the information returned here instead of, or in addition to the HTTP status code returned.". However, this is really hard if they are changing despite being out of beta.
example of an error response body:
{ "error": {
"code": "InvalidAuthenticationToken",
"message": "Access token has expired.",
"innerError": {
"request-id": "267438d2-4cc5-4621-9307-2af26d2f5b49",
"date": "2016-02-16T13:30:24"
}
}
}

Resources