| title | notebook: getRecentNotebooks |
|---|---|
| description | Get a list of recentNotebook instances that have been accessed by the signed-in user. |
| author | jewan-microsoft |
| ms.localizationpriority | medium |
| ms.subservice | onenote |
| doc_type | apiPageType |
| ms.date | 08/02/2024 |
Namespace: microsoft.graph
[!INCLUDE beta-disclaimer]
Get a list of recentNotebook instances that have been accessed by the signed-in user.
[!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/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks})
GET /users/{id | userPrincipalName}/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks={includePersonalNotebooks})The {id | userPrincipalName} for the user must match the user encoded in the authorization token used to make the request.
| Parameter | Type | Description |
|---|---|---|
| includePersonalNotebooks | Boolean | Include notebooks owned by the user. Set to true to include notebooks owned by the user; otherwise, set to false. If you don't include the includePersonalNotebooks parameter, your request returns a 400 error response. |
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
A successful response returns a 200 OK that contains a JSON collection of recentNotebooks.
The following example shows how to call this API.
The following example shows the request.
GET https://graph.microsoft.com/beta/me/onenote/notebooks/getRecentNotebooks(includePersonalNotebooks=true)
[!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/json
Content-Length: 1110
{
"value":[
{
"name":"Personal Notebook","lastAccessedTime":"timestamp","links":{
"oneNoteClientUrl":{
"href":"onenote:href-value"
},"oneNoteWebUrl":{
"href":"href-value"
}
},"sourceService":"OneDrive"
},{
"name":"Team Shared Notebook","lastAccessedTime":"timestamp","links":{
"oneNoteClientUrl":{
"href":"onenote:href-value"
},"oneNoteWebUrl":{
"href":"href-value"
}
},"sourceService":"OneDriveForBusiness"
}
]
}