Training
Learning path
Implement finance and operations apps - Training
Plan and design your project methodology to successfully implement finance and operations apps with FastTrack services, data management and more.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article describes error codes that the OneNote API in Microsoft Graph returns when a request that is sent through the API fails.
When your request generates an error, the OneNote API stops performing the request and returns an error response as a JSON object. An error response contains the associated error code, a message, and a link to the appropriate section of this article. The following example shows how an error response looks.
{
"error":{
"code":"10002",
"message":"The service is currently unavailable. Please try again later.",
"innerError": {
"requestId": "request-id",
"date": "date-time"
}
}
}
For more information about Microsoft Graph errors, see Microsoft Graph error responses and resource types.
The service is having problems or is sending information to the application.
An unexpected error occurred and the request failed.
The service is not currently available.
The current user's account exceeded the maximum number of active requests. Your app needs to repeat the request.
The service can't create a page in the requested section because that section is protected by a password.
The request contains more than the maximum number of image tags in which the data-render-src attribute contains a PDF. See Add images and files.
The OneNote API was unable to create a page in the specified section because that section is corrupt.
The server is too busy to handle the incoming request at this moment. Try again later.
One or more of the document libraries on the user or group's OneDrive contains more than 5000 OneNote items (notebooks, sections, section groups), and cannot be queried using the API. Make sure that none of the user or group's document libraries contains more than 5000 OneNote items. See the OneNote Dev blog for mitigation steps.
Unable to create or update the entity because the library that contains the notebook requires items to be checked out before they can be edited. For more information, see Set up a library to require check-out of files.
Either remove the check-out requirement from the library, or move the notebook.
One or more of the document libraries on the user or group's OneDrive contains more than 20,000 items and cannot be indexed for querying using the API. Make sure that none of the user or group's document libraries contains more than 20,000 items. See the OneNote Dev blog for mitigation steps.
Azure Key Vault is too busy to handle the incoming request at this moment. Try again later.
SharePoint is currently unavailable. Try again later.
Document library on the user or group's OneDrive exceeded unique security scopes threshold limit. The maximum number of unique security scopes set for a library cannot exceed 50,000.
Bad Request.
The request failed because an undetermined error occurred.
The application code did something wrong.
The request is missing the required "Presentation" part. Exactly one is required.
The request contains two or more "Presentation" parts. Exactly one is required.
The content type of the "Presentation" part can be only text/HTML or application/XHTML+XML.
The "Presentation" part HTML contains an image tag with both the src and the data-render-src properties set. The API ignores the src property and uses the data-render-src property.
The request URI is too long. The maximum size of the URI (including all parameters and data) is 16 KB or 16,384 characters.
The "Presentation" part HTML contains an image tag with neither the src nor the data-render-src properties set. The API ignores the image tag.
The "Presentation" part HTML contains a created date/time string that does not match any of the allowed formats.
The size of the request is too large.
The request contains parts with duplicate names. Part names must be unique.
The Content-Disposition header was not supplied for the specified content type.
The request contains a malformed multipart payload. Problems could include missing blank lines, a missing last line, incorrectly formatted part separators, and so on. If you're building the multipart message by hand, carefully check the logic, or consider using a third-party library.
The request doesn't supply a content type for the specified part.
The request doesn't supply Content-Type and Content-Disposition headers for the specified part.
The length of a part in the multipart message exceeds the maximum size of 25 MB.
The count of parts in the multipart message exceeds the limit of 500.
The length of the multipart message exceeds the limit of 75 MB.
The email MIME was malformed.
The meeting MIME or ICal was malformed.
No ICal was found.
Encountered malformed Json in request body.
Something is wrong with the syntax of your request.
The property that you requested doesn't exist.
You requested a resource that doesn't exist.
The expand query is not supported for this request. See Supported OData query string options.
The pagelevel query option is supported only when querying for the pages collection in a section or for a specific page. For example:
GET ../sections/{id}/pages?pagelevel=true
GET ../pages/{id}?pagelevel=true
Your request contains a query operator that is not supported.
Your request contains unsupported OData query parameters.
The payload in the PATCH request is not constructed correctly.
Page create requests with data parts require the content to be multipart, with a "Presentation" part.
Your request uses an OData feature that isn't supported.
Your request contains an invalid ID for the target notebook, section group, section, or page entity.
The resource specified in the request was deleted.
The name contains invalid characters. A notebook name cannot contain any of the following characters: ? * \ / : < > | ' "
An item with the name you specified already exists in the location that you specified.
The HTML in the "Presentation" part contains a data-attachment attribute that either doesn't have a valid format or includes one or more of these invalid characters for a file name: \ / : * ? < > | "
. The request substituted the value indicated in the error message.
Your request specifies a PATCH target that can't be located.
Your request contains an invalid PATCH argument. See Update page content.
Your request specifies an unsupported PATCH action. See Update page content.
The PATCH request is unable to alter the specified page.
Your multipart PATCH request doesn't include a "commands" part with the PATCH action JSON structure. See Update page content.
Your PATCH request contains no actions. See Update page content.
The message body contains either incorrectly formatted JSON or fields that are not supported for this operation.
Your request specifies the name of an unknown property.
Your request contains an OData syntax error at the position indicated in the message.
Your request contains a top query string option whose value is too high. For page queries, the maximum value is 100, and the default value is 20.
Your request contains a URI that points to an HTTP resource that can't be found.
Your request contains an invalid value for Content-Type. Use the value indicated in the message.
Your request contains invalid content. Common causes for this are a missing Content-Type request header and/or no content in the body of the request.
Your request specifies a PATCH target that isn't supported. See Update page content.
Your request specifies an invalid element as the target of the PATCH action. If the target uses the data-id identifier, make sure you prefix it with a # symbol. See Update page content.
Your request specifies an entity type that isn't supported for the PATCH operation. See Update page content.
Your request contains an invalid or missing data-render-src or data-render-method attribute. See Extract data from captures.
The target page does not support PATCH requests.
The target element type in your PATCH request doesn't support the append action. See Update page content.
Your request contains an invalid data-tag attribute value. See Use note tags.
Your request contains an invalid data-tag status value. Check box note tags can have a completed status.
Example:
<p data-tag="to-do:completed">To-do note tag in completed state (checked box in the UI)</p>
See Use note tags.
The target in your PATCH request doesn't support the specified action. See Update page content.
Your request contains an expand expression for a parent of child entities or a child of parent entities, which isn't supported. See Supported OData query string options.
The OData query is invalid.
Your request contains an expand expression for a non-navigation property. Only navigation properties can be expanded.
The select or expand expression in your request contains an invalid term.
The style="position:absolute"
attribute is specified on an element, but the body element does not specify data-absolute-enabled="true"
, which is required to support positioning. All position settings will be ignored. See Create absolute positioned elements.
The style="position:absolute"
attribute is specified on an element that isn't a direct child of the body element, which isn't supported. If the element is a div, img, or object, make it a direct child of the body; otherwise the position settings is ignored and its content renders inside an absolute positioned div. See Create absolute positioned elements.
The style="position:absolute"
attribute is specified on an element type that does not support it. Only div, img, and object elements that are direct children of the page body support positioning. See Create absolute positioned elements.
Your request specifies a target element that cannot be found.
The request isn't valid for this authentication type. Use the ../me/onenote/
path instead.
The request isn't valid for this authentication type. Use the ../me/onenote/section/{id}/pages
endpoint to create a page in a specific section.
There is no name value specified for the entity. The name must be defined, and it cannot contain whitespaces only.
The entity name contains invalid characters. The name cannot contain the following characters: ? * \ / : < > | & # " % ~
The entity name cannot start with a space.
The entity name is too long. Notebook names have a 128-character limit. Other entity names have a 50-character limit.
The specified ID for the destination resource does not exist.
The specified ID for the destination entity is invalid.
Unable to get metadata for the site URL specified in the request. Check the format of the supplied URL. Supported formats include https://domain.sharepoint.com/site-a
and https://domain.com/sites/site-a
.
Unable to find an Office 365 unified group that has the specified ID.
The context does not specify a valid user ID. One common error is that PUID/CID was passed in as a long instead of a hex.
The application has issued too many requests on behalf of a user in a short period of time. To help ensure that the OneNote API remains stable and responsive, the API returns a 429 status code and this error when it detects that an application is using too many resources.
For more information, see Microsoft Graph service-specific throttling guidance.
The video source specified in the request isn't supported. See Supported video sites for the current list.
The number of maximum sections is exceeded for this request. To get pages for accounts with a high number of sections, we recommend getting pages for one section at a time (use the List pages API).
Something is wrong with the user's account.
The user account exceeded its OneDrive quota. See OneDrive.
Nothing more can be added to the requested section because it has reached its maximum size.
Resource consumption is too high for the request. Either the target user account has a large dataset, or the service is receiving a high number of concurrent requests to the same site (for example, the user's personal site or a team site).
The user account was suspended.
The user's personal OneDrive for Business site isn't provisioned, which is required to access notebooks. The OneNote service will provision the site now. This process may take several minutes.
OneDrive for Business is being provisioned for the user.
The user's personal OneDrive for Business could not be retrieved. The following table lists some possible causes.
Cause | Resolution |
---|---|
The user's personal site has not been provisioned. | The user should open OneDrive for Business and follow any instructions to provision the site. If this fails, they should contact their Microsoft 365 tenant administrator. |
The user's personal site is currently being provisioned. | Try the request later. |
The user does not have a valid OneDrive for Business license. | The user should contact their Microsoft 365 tenant administrator. |
A network issue prevented the request from being successfully sent. | Try the request later. |
Some users in the request do not exist.
Student Information Services has not been registered for this tenant.
There is a generic error with Student Information Services.
Multiple users affected by the request had the same username.
The notebook isn't configured to allow invites.
There is a required parameter missing.
The user or application does not have the correct permissions.
The request doesn't contain a valid OAuth token. See Notes permissions.
The user doesn't have permission to write to the requested location.
The user doesn't have permission to access the requested resource.
The OAuth token doesn't have the required scopes to perform the requested action. See Notes permissions.
The OAuth token doesn't have the required scopes to perform the requested action. Specifically the edit permission. See Notes permissions.
The user does not have permissions to access this resource.
Access is Forbidden for this resource.
The container is already in use by another resource.
Training
Learning path
Implement finance and operations apps - Training
Plan and design your project methodology to successfully implement finance and operations apps with FastTrack services, data management and more.