Get resource

Retrieve the binary data of a file or image resource object.

Prerequisites

One of the following scopes is required to execute this API:
Notes.Read, Notes.ReadWrite, Notes.Read.All, or Notes.ReadWrite.All

HTTP request

GET /me/onenote/resources/{id}/content
GET /users/{id | userPrincipalName}/onenote/resources/{id}/content
GET /groups/{id}/onenote/resources/{id}/content

Request headers

Name Type Description
Authorization string Bearer <token> A valid OAuth token provided to the app based on the user credentials and the user having authorized access.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and the image or file binary data in the response body.

Note: Images won't render directly in a browser because they require authorization to retrieve them, like the rest of the page content.

Example

Request

Here is an example of the request.

GET https://graph.microsoft.com/beta/me/onenote/resources/{id}/content
Response

Here is an example of the response.

HTTP/1.1 200 OK

...binary data...