ListItem delta queries issue

Miguel Angel García Martínez 10 Reputation points
2024-06-18T09:27:08.6466667+00:00

We are experiencing issues with some listItems delta queries to MS Graph since last Friday, June 14th.

Before that date, this request was working fine:

https://graph.microsoft.com/v1.0/sites/{siteId}/lists/{listId}/items/delta?$select=id,contentType,sharepointIds&$expand=fields($select=Id,DocIcon)&$filter=startsWith(contentType/id,'{contentTypeId}')

As mentioned in the documentation https://learn.microsoft.com/en-us/graph/api/listitem-delta?view=graph-rest-1.0&tabs=http, the response was returning a 'deltaLink' property with a '$token' that could be used to make an additional request to get changes since the time we had that token, adding $filters, $selects, or whatever we preferred.

"@odata.deltaLink": "https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE/lists/22e03ef3-6ef4-424d-a1d3-92a337807c30/items/delta?**token=1230919asd190410jlka**"

Now, it seems that this has changed.
User's image

The response URL now includes a $deltaLink parameter with a $deltaToken property, and we must use that exact URL to get the changed values, without adding any additional filters or select parameters. Previously, we had to add the token as parameter $token in the query.

Additionally, we have noticed other changes. For instance, even if we specify to obtain the driveItemId, it is being ignored, which was working fine a few days ago (both in beta and the stable version).

&$expand=driveItem($select=id)

The following filter is now failing, although it was working correctly in Beta:

and (fields/DocIcon eq 'txt' or fields/DocIcon eq 'md' or
fields/DocIcon eq 'json' or fields/DocIcon eq 'docx' or fields/DocIcon
eq 'pdf' or fields/DocIcon eq 'xlsx' or fields/DocIcon eq 'pptx')

This also happened more or less in April and finally was reverted some days after.

Any idea about how it should work now? Is this a temporary issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,200 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,108 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 43,421 Reputation points Microsoft Vendor
    2024-06-19T09:05:42.52+00:00

    1.In both 1.0 and beta version of Graph, ListItem delta query supports the $select, $expand, and $to OData query parameters. It does not support filter parament.

    2.I can reproduce the issue, OData query parameters do not work with @odata.deltaLink in the Graph explorer.

    3.Here are example codes to get ListItem delta from local.

        var listItems = await graphClient.Sites["xxxxxxxx"].Lists["xxxxxxxxxx"].Items.Delta.WithUrl("https://graph.microsoft.com/v1.0/sites/xxxxxxxx/lists/xxxxxxxx/items/delta?$deltatoken=xxxxxxxxx").GetAsDeltaGetResponseAsync();
     
        foreach (var listItem in listItems.Value)
     
        {
     
            Console.WriteLine("id: " + listItem.Id + "\n" + "type: " + listItem.ContentType);     
        }
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.