web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can't update Modified ...
Power Automate
Unanswered

Can't update Modified field in SharePoint library via ValidateUpdateListItem

(0) ShareShare
ReportReport
Posted on by 124

In the past, I've been able to update the Modified and Modified By fields of files in a SharePoint library (note: library, not list) by making an HTTP request to ValidateUpdateListItem. It's described here - #FlowNinja hack 78 - modifying Modified By and Modified time with Microsoft Flow — John Liu .NET. Unfortunately, this now seems to have stopped working.

 

This is the body of the request.

 

{"formValues":[
{
 "FieldName":"Editor",
 "FieldValue":"[{'Key':'i:0#.f|membership|***email***'}]"
},
{
 "FieldName":"Title",
 "FieldValue":"000000000test.docx"
 },
 {
 "FieldName":"FileLeafRef",
 "FieldValue":"000000000test.docx" 
},
 {
 "FieldName":"Modified",
 "FieldValue":"2024-03-18 16:20:00Z"
 }
],
"bNewDocumentUpdate":true,
"datesInUTC":true
}

 

 

The file is renamed correctly but the actual modified time is the time the flow runs, and the user who modified it is set to myself.

 

Response:

 

{
 "d": {
 "ValidateUpdateListItem": {
 "__metadata": {
 "type": "Collection(SP.ListItemFormUpdateValue)"
 },
 "results": [
 {
 "ErrorCode": 0,
 "ErrorMessage": null,
 "FieldName": "Editor",
 "FieldValue": "[{'Key':'i:0#.f|membership|***email address***'}]",
 "HasException": false,
 "ItemId": 326
 },
 {
 "ErrorCode": 0,
 "ErrorMessage": null,
 "FieldName": "Title",
 "FieldValue": "000000000test.docx",
 "HasException": false,
 "ItemId": 326
 },
 {
 "ErrorCode": 0,
 "ErrorMessage": null,
 "FieldName": "FileLeafRef",
 "FieldValue": "000000000test.docx",
 "HasException": false,
 "ItemId": 326
 },
 {
 "ErrorCode": 0,
 "ErrorMessage": null,
 "FieldName": "Modified",
 "FieldValue": "2024-03-18 16:20:00Z",
 "HasException": false,
 "ItemId": 326
 }
 ]
 }
 }
}

 

 

msedge_0QqODiQal3.png

What I've tried:

  • Setting the Modified By field at the same time
  • Adjusting the Read Only attribute on Modified to false
  • Adjusting the Read Only attribute on Last Modified to false
  • Adjusting the Read Only attribute on Last Modified Date to false
  • Setting a different DateTime column with the same value, to check my formatting isn't at fault

I have had no success with the above. Can anyone suggest what might be the issue?

Categories:
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at

    Hi @Spinner,

     

    I will have a look if I can reproduce not being able to update the Modified value.

     

    In the meantime I see you have used a datesInUTC parameter in the validateUpdatelistItem method. I am unfamiliar with that specific parameter. Also the documentation only lists the formValues and bNewDocumentUpdate parameters, https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-visio/jj246412(v=office.15)#parameters

     

    My suggestion would be to try it without that datesInUTC parameter to see if that makes a difference?

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard