Introduction

In this article, I will show you how to update created by and modified by value of a SharePoint list item.

Sometimes we are required to change the created by and/or modified by value of a SharePoint list. For example, if you have uploaded or exported items to a SharePoint list for use with Power Apps, and you want to limit the view to only the signed in user when accessing the app, this article is for you. We can easily update value of both these fields using power automate.

Step 1

Create Power Automate Flow.

Step 2

Add the Get items action to your flow and use the filter query to update your record or records of choice.

Step 3

Add an Apply to each control and add value of the Get items action to the output. Then add an action inside the apply to each loop called Send an HTTP request to SharePoint.

Step 4

Add your site address to the action.

Step 5

Select POST inside the Method box.

Step 6

Pass your Uri in Uri box as below by adding the ‘ID’ of the Get items action.

Example : _api/web/lists/GetByTitle(‘FlowTest’)/items(‘ID’)/ValidateUpdateListItem

Step 7

Pass the Header as below:

{

    “Content-Type”: “application/json;odata=verbose”

}

Step 8

Pass the Body as below:

{

    “formValues”: [{

        “FieldName”: “Author”,

        “FieldValue”: “[{‘Key’:’i:0#.f|membership|admin@mmurillo.onmicrosoft.com‘}]”

    }, {

        “FieldName”: “Editor”,

        “FieldValue”: “[{‘Key’:’i:0#.f|membership|admin@mmurillo.onmicrosoft.com‘}]”

    }]

}

Note
Change your users email in the body Key value

Step 9

Save your flow and run.

Conclusion

This is how we can update the created by and modified by columns of SharePoint list items.


Credit goes to Harshad Tretiya for the initial post. Then I modified it with adding the Get Items action etc. : https://www.c-sharpcorner.com/members/harshad-tretiya

Get in Touch

Ready for Worry-Free IT? We can help.

Copyright 2024 © All rights Reserved. The IT Geeks.

Share this:

Like this:

Like Loading...

Need Help?

We're Here To Assist You

Schedule Your Appointment.

Feel free to schedule your appointment, and we will be more than happy to assist you with all of your IT needs.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Need Help?

We're Here To Assist You

Something isn’t Clear?

Feel free to contact us, and we will be more than happy to answer all of your questions.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.