Update List items in sharepoint online without updating MOdified By and Modified Date information

Deepak Trivedi 0 Reputation points
2023-08-09T09:49:42.8566667+00:00

I wanted to update list items in sharepoint online without updating their Modified date and Modified by columns is it possible?

Either these two column should not be updated or they should be updated with previous values.

Thanks in advance.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Petro VORONOV 5 Reputation points
    2023-11-20T16:22:32.3033333+00:00

    You can do it. At least I'm doing it now ;-)

    It can be done via SharePoint PI v.1.0
    You can make a post request to next url:

    https://site.sharepoint.com/sites/site-id/_api/web/Lists/GetByTitle('List_Name')/items(Item_Id)/validateUpdateListItem
    

    with headers

    Accept: application/json; odata=verbose
    Content-Type: application/json; odata=verbose
    

    and body

    {    
      "formValues":[       
        {          
          "FieldName":"Author",          
          "FieldValue":"[{'Key':'i:0#.f|membership|_user_id_'}]"       
        },       
        {          
          "FieldName":"Editor",          
          "FieldValue":"[{'Key':'i:0#.f|membership|_user_id_'}]"       
        },       
        {          
          "FieldName":"Modified",          
          "FieldValue":"2023-07-20 15:22:34"       
        }    
      ],    
      "bNewDocumentUpdate":true 
    }
    

    I use it to fix the Author and Editor of items in a list, which was uploaded by "technical" user, to replace it by appropriate "real" user. Via cloud flow.

    1 person found this answer helpful.
    0 comments No comments

  2. Emily Du-MSFT 51,856 Reputation points Microsoft External Staff
    2023-08-10T02:12:06.3633333+00:00

    Modified and Modified by columns are used to record when and who modified items.

    In the SharePoint mechanism, it is designed and established. There is no possibility to update list items in SharePoint Online without updating their Modified and Modified by columns.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.