Skip to content

Latest commit

 

History

History
126 lines (95 loc) · 4.07 KB

File metadata and controls

126 lines (95 loc) · 4.07 KB
title description ms.localizationpriority author ms.subservice doc_type
Get resource
Retrieve the binary data of a file or image resource object.
medium
jewan-microsoft
onenote
apiPageType

Get resource

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

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

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

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

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

Don't 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 don't render directly in a browser because they require authorization to retrieve them, like the rest of the page content.

Example

Request

The following example shows a request.

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

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

The following example shows the response.

HTTP/1.1 200 OK
Content-Type: application/octet-stream

...binary data...