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
}

Conclussion & 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…