The problem has already been solved. API now works as expected
/delta API for SharePoint Item is not returning expanded fields anymore
Hello everyone,
our automated tests have started failing over the weekend because the Graph Delta APIs for SharePoint List Items (BETA) are not returning any expanded fields anymore:
https://graph.microsoft.com/**beta**/sites/82e26776-0c36-4045-b04c0f0ea7128418/lists/8739dd23-c686-4eaa-9921- 2597235bd0f0**/items/delta**?$select=lastModifiedDateTime&$expand=fields($select=File_x002 0_Type)
Until last week this API returned only the selected fields (check for property File_x0020_Type):
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.listItem)",
"@odata.nextLink": "https://graph.microsoft.com/beta/sites/82e26776-0c36-4045-b04c-0f0ea7128418/lists/8739dd23-c686-4eaa-9921-2597235bd0f0/items/delta?$skiptoken=UrbqtLxrZPwDaET85jZqQEQrpByWxV15aXQjwm7qGu6w0LSf0H62Ekk5vVAJS-SHAF7K3gLQRuHhCBYjlvW0eSEAhtwclPTpgcyMyXsHOzz_oi60OQy0GSfMeEF8iDkuRuDRcnxSc3MBPcKqB8OkjMf_fF14ikT_1idU01CDcIVnTOy8QBIKV7LaKD9fIrA5Y41xlU3dsImeILDuGHgbj8wI2_niuAuMZB_5DPpcKFbxGqQ-YZbrCUko-RCSchnSEfh4KySokZ8yTOGOQmF_yWf-XldihZaBxoPW_yKwl4.wGBcHU--LDQ3OehExDKy4RTHnLG5zDxcgAb3XCQPVQs",
"value": [
{
"lastModifiedDateTime": "2024-04-02T08:48:02Z",
"id": "1",
"fields": {
"File_x0020_Type": "xlsx"
}
}
]
}
Now it returns the default fields but not the selected fields anymore (check for property File_x0020_Type, which is missing from the returned JSON):
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.listItem)",
"@odata.nextLink": "https://graph.microsoft.com/beta/sites/82e26776-0c36-4045-b04c0f0ea7128418/lists/8739dd23-c686-4eaa-9921-2597235bd0f0/items/delta?$skiptoken=UrbqtLxrZPwDaET85jZqQEQrpByWxV15aXQjwm7qGu6w0LSf0H62Ekk5vVAJS-SHAF7K3gLQRuHhCBYjlvW0eSEAhtwclPTpgcyMyXsHOzz_oi60OQy0GSfMeEF8iDkuRuDRcnxSc3MBPcKqB8OkjMf_fF14ikT_1idU01CDcIVnTOy8QBIKV7LaKD9fIrA5Y41xlU3dsImeILDuGHgbj8wI2_niuAuMZB_5DPpcKFbxGqQ-YZbrCUkoRCSchnSEfh4KySokZ8yTOGOQmF_yWf-XldihZaBxoPW_yKwl4.wGBcHU--LDQ3OehExDKy4RTHnLG5zDxcgAb3XCQPVQs",
"value": [
{
"lastModifiedDateTime": "2024-04-02T08:48:02Z",
"id": "1",
"fields": {
"@odata.etag": "\"{A52B3770-CC88-497C-A850-409E3086F995},20\"",
"FileLeafRef": "TestExcel2.xlsx",
"SingleLineOfText": "asdasdasdasd",
"YesNo": true,
"ContentType": "Document",
"Created": "2021-06-17T12:46:04Z",
"AuthorLookupId": "6",
"Modified": "2024-04-02T08:48:02Z",
"EditorLookupId": "6",
"_CheckinComment": "",
"LinkFilenameNoMenu": "TestExcel2.xlsx",
"LinkFilename": "TestExcel2.xlsx",
"DocIcon": "xlsx",
"FileSizeDisplay": "14170",
"ItemChildCount": "0",
"FolderChildCount": "0",
"_ComplianceFlags": "",
"_ComplianceTag": "",
"_ComplianceTagWrittenTime": "",
"_ComplianceTagUserId": "",
"_CommentCount": "",
"_LikeCount": "",
"_DisplayName": "",
"Edit": "0",
"_UIVersionString": "5.0",
"******@odata.type": "#Collection(microsoft.graph.Json)",
"MediaServiceImageTags": [],
"id": "1"
}
}
]
}
When using just /items instead of /items/delta endpoint the $expand statement still works as expected (check for property File_x0020_Type):
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#sites('82e26776-0c36-4045-b04c-0f0ea7128418')/lists('8739dd23-c686-4eaa-9921-2597235bd0f0')/items(lastModifiedDateTime,fields(File_x0020_Type))",
"value": [
{
"@odata.etag": "\"a52b3770-cc88-497c-a850-409e3086f995,13\"",
"id": "1",
"fields@odata.context": "https://graph.microsoft.com/beta/$metadata#sites('82e26776-0c36-4045-b04c-0f0ea7128418')/lists('8739dd23-c686-4eaa-9921-2597235bd0f0')/items('1')/fields(File_x0020_Type)/$entity",
"fields": {
"@odata.etag": "\"a52b3770-cc88-497c-a850-409e3086f995,13\"",
"File_x0020_Type": "xlsx"
}
}
]
}
Can you please investigate why this API operation no longer works or if anyone has a similar problem and find a solution?