oauth2permissiongrant: delta

Namespace: microsoft.graph

Get newly created, updated, or deleted oauth2permissiongrant objects without performing a full read of the entire resource collection. For details, see Using delta query.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Directory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All
Delegated (personal Microsoft account) Not supported.
Application Directory.Read.All, Directory.ReadWrite.All

HTTP request

GET /oauth2PermissionGrants/delta

Query parameters

Tracking changes incurs a round of one or more delta function calls. If you use any query parameter (other than $deltatoken and $skiptoken), you must specify it in the initial delta request. Microsoft Graph automatically encodes any specified parameters into the token portion of the nextLink or deltaLink URL provided in the response. You only need to specify query parameters once. In subsequent requests, copy and apply the nextLink or deltaLink URL from the previous response. The URL includes the encoded parameters.

Query parameter Type Description
$deltatoken string A state token returned in the 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 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 nextLink URL of the previous delta function call, indicating that there are further changes to be tracked in the same resource collection.

Optional query parameters

This method supports OData query parameters to help customize the response.

  • You can use a $select query parameter to specify only the properties you need for best performance. The id property is always returned.
  • The $filter query parameter can only be used to track changes on specific resources by using the resource ID. For example, $filter=id+eq+{value} or $filter=id+eq+{value1}+or+id+eq+{value2}.

Request headers

Name Description
Authorization Bearer {token}. Required.

Request body

Do not supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and an oauth2permissiongrant collection object in the response body. The response also includes a nextLink URL or a deltaLink URL.

  • If a nextLink URL is returned, additional pages of data can be retrieved in the session. The oauth2permissiongrant continues making requests using the nextLink URL until a deltaLink URL is included in the response.
  • If a deltaLink URL is returned, no more data about the resource is returned. Persist and use the deltaLink URL to learn about changes to the resource in the future.

For details, see Using delta query. For example requests, see Get incremental changes for users.

Example

Request

GET https://graph.microsoft.com/v1.0/oauth2PermissionGrants/delta

Response

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#oauth2permissiongrants",
  "@odata.nextLink":"https://graph.microsoft.com/v1.0/oauth2permissiongrants/delta?$skiptoken=pqwSUjGYvb3jQpbwVAwEL7yuI3dU1LecfkkfLPtnIjsXoYQp_dpA3cNJWc",
  "value": [
    {
      "clientId": "22a3c970-8ad4-4120-8127-300837f87f2c",
      "consentType": "Principal",
      "principalId": "c2e8df37-c6a7-4d88-89b1-feb4f1fda7c5",
      "resourceId": "98dc9d95-49b6-405a-b3c0-834e969a708b",
      "scope": "User.Read Directory.AccessAsUser.All",
      "id": "cMmjItSKIEGBJzAIN_h_LJWd3Ji2SVpAs8CDTpaacIs33-jCp8aITYmx_rTx_afF"
    }
  ]
}