| title | device: delta |
|---|---|
| description | Get created, updated, or deleted devices without performing a full read of the entire resource collection. |
| ms.localizationpriority | medium |
| author | msdhou |
| ms.subservice | entra-directory-management |
| doc_type | apiPageType |
| ms.date | 10/25/2024 |
Namespace: microsoft.graph
Get newly created, updated, or deleted devices without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details.
[!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]
[!INCLUDE rbac-devices-apis-read]
To begin tracking changes, you make a request including the delta function on the device resource.
GET /devices/deltaTracking changes incurs a round of one or more delta function calls. To use any query parameter other than $deltatoken and $skiptoken, you must specify it in the initial delta request and Microsoft Graph automatically encodes any specified parameters into the $deltatoken portion of the @odata.nextLink or @odata.deltaLink URL provided in the response.
| Query parameter | Type | Description |
|---|---|---|
| $deltatoken | string | A state token returned in the @odata.deltaLink URL of the previous delta function call for the same resource collection, indicating the completion of that round of change tracking. Save and apply the entire @odata.deltaLink URL including this token in the first request of the next round of change tracking for that collection. |
| $skiptoken | string | A state token returned in the @odata.nextLink URL of the previous delta function call, indicating that there are further changes to be tracked in the same resource collection. |
This method supports OData query parameters to help customize the response.
- You can use the
$selectquery parameter to specify only the properties your need for best performance. The id property is always returned. - There is limited support for
$filter. The only supported$filterexpression is for tracking changes for specific resources, by their ID:$filter=id+eq+'{value}'or$filter=id+eq+'{value1}'+or+id+eq+'{value2}'. The number of IDs you can specify is limited by the maximum URL length.
| Name | Description |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Don't supply a request body for this method.
If successful, this method returns a 200 OK response code and a collection of device objects in the response body. The response also includes a @odata.nextLink URL or a @odata.deltaLink URL.
- If a
@odata.nextLinkURL is returned, there are additional pages of data to be retrieved in the session. The device continues making requests using the@odata.nextLinkURL until a@odata.deltaLinkURL is included in the response. - If a
@odata.deltaLinkURL is returned, there is no more data about the existing state of the resource to be returned. Persist and use the@odata.deltaLinkURL to learn about changes to the resource in the future.
For more informantion, see Using delta query. For example requests, see Get incremental changes for users.
GET https://graph.microsoft.com/v1.0/devices/delta
[!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]
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#devices",
"@odata.nextLink":"https://graph.microsoft.com/v1.0/devices/delta?$skiptoken=pqwSUjGYvb3jQpbwVAwEL7yuI3dU1LecfkkfLPtnIjsXoYQp_dpA3cNJWc",
"value": [
{
"accountEnabled": false,
"createdDateTime": "2022-05-05T20:56:06Z",
"deviceId": "4c299165-6e8f-4b45-a5ba-c5d250a707ff",
"displayName": "Test device",
"operatingSystem": "linux",
"operatingSystemVersion": "1",
"id": "c9d9f9b3-0c91-4080-b392-78f775903b3a",
"alternativeSecurityIds": [
{
"type": 2,
"identityProvider": null,
"key": "base64Y3YxN2E1MWFlYw=="
}
]
}
]
}