You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When retrieving lists for a SharePoint site thru either Get-MgSiteList or an API call to /sites/{site-id}/lists, the returned data contains the lastModifiedDateTime property for each returned list.
This property represents when the lists objects were modified but does not represent when an actual user made any updates to the list’s items.
In addition to the modified date reported by Graph, CSOM and PnP both return additional properties, like the LastItemUserModifiedDate which are very helpful.
This value can be obtained by iterating thru the items of a list and keeping the most recent value. To be able to accomplish this, it’s necessary to use the expand parameter to obtain the items in the returned data.
When dealing with a high number of lists and/or items per lists, expanding the items can be costly, not to mention complicated when dealing with list with >200 items. As an example, querying a single list with 200 items, the calls without the expand parameter averages around 200ms and the expand parameter brings this to 1.5s.
What’s curious is that PnP and CSOM both return the LastItemUserModifiedDate for a site well under a second. If that’s so, it means that this data is available under the hood.
Consequently, my teammates and I were wondering if it’s an enhancement that can be requested.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
When retrieving lists for a SharePoint site thru either Get-MgSiteList or an API call to /sites/{site-id}/lists, the returned data contains the lastModifiedDateTime property for each returned list.
This property represents when the lists objects were modified but does not represent when an actual user made any updates to the list’s items.
In addition to the modified date reported by Graph, CSOM and PnP both return additional properties, like the LastItemUserModifiedDate which are very helpful.
This value can be obtained by iterating thru the items of a list and keeping the most recent value. To be able to accomplish this, it’s necessary to use the expand parameter to obtain the items in the returned data.
When dealing with a high number of lists and/or items per lists, expanding the items can be costly, not to mention complicated when dealing with list with >200 items. As an example, querying a single list with 200 items, the calls without the expand parameter averages around 200ms and the expand parameter brings this to 1.5s.
What’s curious is that PnP and CSOM both return the LastItemUserModifiedDate for a site well under a second. If that’s so, it means that this data is available under the hood.
Consequently, my teammates and I were wondering if it’s an enhancement that can be requested.
Cheers!
Martin
Beta Was this translation helpful? Give feedback.
All reactions