Introduction
In this post let us learn how we can modify the Author and Editor column for a file in a document library using Power Automate. The scenario is very rare and it has to be used with caution. By default the metadata info like Author, Editor, Created, Modified etc should not be changed but in some cases for some requirements, there is a need to change the auto captured metadata info.
Let’s start buiding our Power Automate flow
Manually trigger a flow
Lets start with the manual trigger for demo purpose. In real world scenario, it could be a recurrence trigger or trigger based on some action from the list item or file.

Compose – Key Value pair for Person Field
Next action is to use Compose action to generate a key-value pair for the Author & Editor value. In this demo, I am using the same value for both Author & Editor. If the values are different, you could use different Compose action.

Compose – Key Value pair for Metadata Info
Next action is also the Compose action, but this time we are using to generate the key-value pair array for the actual metadata that we would like to change for a file or list item. The FieldValue for both the fields are mapped to the same output which is output from the above action. You have to convert the above action output to string. Use the expression string(outputs(‘Compose’)).

Send an HTTP request to SharePoint – Get the file ID
Next action is to get the actual file item ID. If you have the file item ID, then you can skip this action and proceed to the next action. In this action we are getting the file ID which is inside the sub-folder level 3 from the root folder. We are using ListItemAllFields method to get all the metadata info for file as an item.

Send an HTTP request to SharePoint – Update the metadata
Next action is to update the metadata info using the ValidateUpdateListItem REST API method. The input params to the method should be in the below format.
- formValues: The value must be the output of the second Compose action
- bNewDocumentUpdate: true (Not to create any version on update) or false (Create a version on the update)
{
"formValues":@{outputs('Compose_2')},
"bNewDocumentUpdate":true
}

Conclusion & What’s next?
Run the flow and check the Author & Editor column with the latest configured values, the file or item whichever is configured should be updated with the new value. Please use the method with caution and do not use it on a regular basis which will be difficult to find when there is a need to troubleshoot.
I would really appreciate if there is any scenario or problem that you would like me to put it as a blog. Waiting for the replies.
Cheers. Happy Flowing…
Hello! I’ve been following your web site for a while now and finally got the courage to go ahead and give you a shout out from New Caney Tx! Just wanted to say keep up the good job!
LikeLike
I looked through several posts this morning trying to find how to accomplish this. This was the simplest method I’ve seen and I was easily able to execute this. Worked immediately. Thanks for posting the body as text that could be copied – really made things easier!
Thanks!
LikeLike
Hi, I really appreciate your feedback. You can also subscribe to my youtube channel https://www.youtube.com/c/sudharsankgoogle
LikeLike
This is close to what i was looking for but not quite the same.
Scenario:
I have a Sharepoint List that has an import of data including names. Those names are equal to full names of users.
I would like to use this names column to populate a Person field, so the additional user data is available to viewers of the list (chat, email, org etc).
I have tried using a Person field for the names data, but of course the Person field cannot be defaulted in this way.
I have tried a Custom field and to copy the names data across to populate the field, but the names column does not appear in the available columns.
I suspect that a flow is needed to populate the Person column from the names field. Or maybe it is not possible at all.
LikeLike
Hi, to show the person field a unique ID is required. We always use the email which is unique and use the list view formatting to show the person field with other details. You can try the field formatting options and there are many samples available via pnp. But the most important to remember is you need user id or loginname or email since these are unique fields.
LikeLike
Just what I was looking for, I need to make a variation on this to accept old, user then new user and then loop through the list to change old usernames from premigration to new username.
LikeLike