You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contains an expression that specifies the criteria for search.
17
+
Contains an expression that specifies the criteria for search. For more information, see [Filtering mailbox artifacts with granular search queries](/graph/concepts/backup-restore-granular-search.md).
|**type**| string | The type of sharing link to create. Either `view`, `edit`, or `embed`. |
59
-
| **password** | string | The password of the sharing link that is set by the creator. Optional and OneDrive Personal only.
59
+
| **password** | string | The password of the sharing link set by the creator. Optional and OneDrive Personal only.
60
60
|**expirationDateTime**| string | A String with format of yyyy-MM-ddTHH:mm:ssZ of DateTime indicates the expiration time of the permission. |
61
61
|**retainInheritedPermissions**| Boolean | Optional. If `true` (default), any existing inherited permissions are retained on the shared item when sharing this item for the first time. If `false`, all existing permissions are removed when sharing for the first time. |
62
62
|**scope**| string | Optional. The scope of link to create. Either `anonymous`, `organization`, or `users`. |
@@ -74,11 +74,11 @@ The following values are allowed for the **type** parameter.
74
74
### Scope types
75
75
76
76
The following values are allowed for the **scope** parameter.
77
-
If the **scope** parameter is not specified, the default link type for the organization is created.
77
+
If the **scope** parameter isn't specified, the default link type for the organization is created.
| `anonymous` | Anyone with the link has access, without needing to sign in. This may include people outside of your organization. Anonymous link support may be disabled by an administrator.
81
+
| `anonymous` | Anyone with the link has access, without needing to sign in. It may include people outside of your organization. Anonymous link support may be disabled by an administrator.
82
82
| `organization` | Anyone signed into your organization (tenant) can use the link to get access. Only available in OneDrive for Business and SharePoint.
83
83
| `users` | Share only with people you choose inside or outside the organization.
84
84
@@ -87,15 +87,17 @@ If the **scope** parameter is not specified, the default link type for the organ
87
87
88
88
If successful, this method returns a single [Permission](../resources/permission.md) resource in the response body that represents the requested sharing permissions.
89
89
90
-
The response will be`201 Created` if a new sharing link is created for the item or `200 OK` if an existing link is returned.
90
+
The response is`201 Created` if a new sharing link is created for the item or `200 OK` if an existing link is returned.
91
91
92
-
## Example
92
+
## Examples
93
93
94
-
The following example requests a sharing link to be created for the DriveItem specified by {itemId} in the user's OneDrive.
94
+
### Example 1: Creating sharable links
95
+
96
+
The following example requests a sharing link to be created for the DriveItem specified by {item-id} in the user's OneDrive.
95
97
The sharing link is configured to be read-only and usable by anyone with the link.
96
98
All existing permissions are removed when sharing for the first time if `retainInheritedPermissions` is false.
Copy file name to clipboardExpand all lines: api-reference/v1.0/api/driveitem-list-thumbnails.md
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,11 @@ This is currently only supported on OneDrive Personal.
68
68
69
69
If successful, this method returns a `200 OK` response code and collection of [ThumbnailSet](../resources/thumbnailset.md) objects in the response body.
70
70
71
-
## Example
71
+
## Examples
72
+
73
+
### Example 1: Retrieve available thumbnails for an item in the current user's OneDrive
74
+
75
+
#### Request
72
76
73
77
The following example shows a request which retrieves available thumbnails for an item in the current user's OneDrive.
74
78
@@ -117,7 +121,7 @@ Any item in a drive can have zero or more thumbnails.
117
121
For example, `/thumbnails?select=medium` retrieves only the medium sized thumbnails.
Thumbnail URLs are cache-safe. The URL will change, if the item changes in a way that requires a new thumbnail to be generated.
261
266
262
267
263
-
## Getting thumbnails while listing DriveItems
268
+
### Example 4: Getting thumbnails while listing DriveItems
264
269
265
270
If you are retrieving a list of DriveItem resources to display, you can use the _$expand_ query string parameter to also include the thumbnails for those resources.
266
271
This enables your app to retrieve thumbnails and items in a single request, instead of issuing many requests.
267
272
268
-
###HTTP request
273
+
#### Request
269
274
270
275
271
276
# [HTTP](#tab/http)
@@ -305,7 +310,7 @@ GET /me/drive/items/{item-id}/children?$expand=thumbnails
305
310
306
311
---
307
312
308
-
### Response
313
+
####Response
309
314
310
315
The service responses with the list of DriveItems and their thumbnails.
title: "Filtering mailbox artifacts with granular search queries"
3
+
description: "Learn how to create granular search expressions to filter mailbox artifacts during backup and restore operations with Microsoft Graph APIs."
4
+
author: "subham-rkb"
5
+
ms.date: 02/04/2026
6
+
ms.localizationpriority: medium
7
+
ms.subservice: "m365-backup-storage"
8
+
---
9
+
10
+
# Granular search queries for backup and restore APIs
11
+
12
+
Use granular search queries to filter and search for specific mailbox artifacts when using the Microsoft Graph backup and restore APIs. Granular search enables you to construct precise query expressions to find emails, calendar events, contacts, tasks, and notes based on various criteria such as sender, subject, participants, and attachments.
13
+
14
+
## Overview
15
+
16
+
The [artifactQuery](../api-reference/beta/resources/artifactquery.md) resource contains a `queryExpression` property that allows you to specify search criteria for mailbox artifacts. You can combine multiple properties using logical operators to create complex search expressions that filter restore points based on your specific requirements.
17
+
18
+
## Supported properties
19
+
20
+
The following table describes the properties you can use in query expressions.
21
+
22
+
| Property | Description | Value type | Supported operators | Wildcard support |
| Subject | The subject of the message or primary searchable string for other item types | String | -like, -and (up to 3) | * (after string) |
25
+
| Sender | Messages from the specified sender | Display name, Alias, SMTP address, or LegacyDN | -like | * (after string) |
26
+
| Participants | Messages with specified recipient in To, Bcc, or Cc fields | Display name, Alias, SMTP address, or LegacyDN | -like, -and (up to 3) | * (after string) |
27
+
| HasAttachment | Whether the message has an attachment | Boolean (true or false) | -eq | No |
28
+
| MessageKind | The mailbox item type for which to search | Enum: Email, Note, Task, Contact, Calendar | -eq | No |
29
+
30
+
#### Examples
31
+
32
+
Search for emails from a specific sender with attachments
0 commit comments