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 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Retrieve the binary data of a file or image resource object.
[!INCLUDE national-cloud-support]
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]
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
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {token}. Required. |
Don't supply a request body for this method.
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.
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]
The following example shows the response.
HTTP/1.1 200 OK
Content-Type: application/octet-stream
...binary data...