Skip to content

ListItem metadata returned by the SDK is different from what is returned from the API #913

Description

@devistollon

Describe the bug

I am trying to retrieve the ListItem related to a specified DriveItem

I am using the following code:
list_item = await self.graph_client.drives.by_drive_id(self.drive_id).items.by_drive_item_id(drive_item_id=drive_item_id).list_item.get()

After parsing the response, I’ve noticed that some fields in the output have different values compared to those returned by the Graph API playground.

Below is the output with the fields that differ:

// Python SDK Output
{
  //... other fields
  "_Revision": "2024-09-30T02:00:00Z",
  "AuthorLookupId": "2024-09-30T06:00:00Z",
  "EditorLookupId": "2024-09-30T10:00:00Z",
  "ItemChildCount": "2024-09-30T00:00:00Z",
  "FolderChildCount": "2024-09-30T00:00:00Z",
  "_UIVersionString": "2024-09-30T19:00:00Z"
}
// Graph API Playground Output
{
    //... other fields
    "_Revision": "02",
    "AuthorLookupId": "6",
    "EditorLookupId": "10",
    "_UIVersionString": "19.0"
}

For example, the correct _Revision field value is "02", but the SDK returns it as a date. The same issue appears with other standard SHP fields, which are numbers but are somehow converted to dates by the SDK.

Why does this behavior occur?

Expected behavior

I expect that the SDK returns the same value present in the Graph API Playground.

How to reproduce

  • Authentication with ClientSecretCredential class from the azure.identity.aio module;
  • Invoke the function above by passing a drive_id and a drive_item_id;

SDK Version

1.8.0 (Downloaded last week)

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

- OS: Windows Server 2019
- Python version: 3.11.9
- Architecture: x64

### Other information

_No response_

Metadata

Metadata

Labels

questionFurther information is requestedtype:bugA broken experience

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions