“My Power Automate flow creates SharePoint items from MS Forms, but all are created under my account, is there a way to change the author to the user who submitted the form?”
Every action in Power Automate uses a connector of a specific user. By default it’s the user who created the flow (you), and all the actions are done using your account. When you send an email, it’s from your mailbox. If you create a SharePoint item, you’ll be forever the author. The same if you edit an item, you’ll be the editor for each flow change in the version history. Your name will appear everywhere.
But what if you don’t want the same name, let it be your name or some service account, in all the SharePoint items? How can you create items “on behalf” of a user?
You’ll need an HTTP request
It’s not possible to change the item author using the standard actions as there’s no ‘Created By’ field to update. But that doesn’t mean that you can’t change it – it’s just another item property after all. And as such you can update it with an HTTP request. In the same way as you’d change the editor, you can change also the author.
Method: POST
Uri:
_api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem
Body:
{
"formValues":[
{
"FieldName": "Author",
"FieldValue": "[{'Key':'i:0#.f|membership|<author email>'}]"
}
],
"bNewDocumentUpdate": true
}
Note: all the <…> are placeholders, replace them including the < and >.
The request above will take the ‘Created By’ column with internal name ‘Author’, and update it to the specific user using his email address. It’ll do it without creating new item version due to the ‘bNewDocumentUpdate’ parameter.
And when you change the author, you should always change the editor too as they should be the same person for new items.
Summary
When you create SharePoint items in Power Automate flow, you can’t decide who’ll be the author during the creation, but you can change him later. Author is just another property that you can change with an HTTP request. Add the ‘Send an HTTP request to SharePoint’ action after the creation and update the author using his email address. Just don’t forget to update also the editor at the same time.
But before you use this solution, you should really consider if you really need the user information in the system columns. Maybe you could add custom columns instead and keep the “real” author information available.
Thank you for this tip it will be really useful
Great tip! Would it be possible to do the same with the Dataverse?
Hello Sam,
I don’t know if that’s doable in Dataverse, I don’t work with Dataverse that much.
Please also tip us how to print scroll-able Power app forms using flow?
Hello Berihun,
I have no idea how to do that, nor how is it related to changing the SharePoint item author… 🙂
Hi Tom,
Greetings from Poland! I got stuck with an error: 401 UNAUTHORIZED.
– my user is an owner of the site, where the list is placed
– i have good connection in flow (my user)
– i checked also 3 times, if I typed correct e-mail in this line:
“FieldValue”: “[{‘Key’:’i:0#.f|membership|karol@domain.com’}]”
Hello Karol,
I’d try to update some other field via an HTTP request, just to confirm that it’s not somehow blocked on your environment to do these updates.
Thank you for this! Will this work when I am trying to get the list item A from one sharepoint list to create a list item B in a separate sharepoint list with the author who created the item A?
Hello Holly,
yes, it will, create the item first and then update the author.
Great article.
I’m trying to use this to update the author of an item and the flow is not giving any errors but the author of the item is not being updated, any ideas where I might look?
Hello Dan,
I’d double check if you have the input in the right format, other that that I don’t think there’s any error message if the update fails.
Hi i tried this. In the approval email that gets sent out it still comes up as the created by the owner of the flow instead of the employee. Created by “Owner” instead of employee email. My list has spaces such as “new senders list” how would i write this in the URI? GetByTitle(‘new senders list’)/item? or with a %20 in the spaces? or no spaces. Thanks
Hello kaizer,
the list name should be exactly as it’s written, or you can use the list guid to be sure as described here: https://tomriha.com/use-the-correct-sharepoint-list-name-in-the-power-automate-http-request/.
Can I set an anonymous system user like “SharePoint App” as author instead of a real M365 account?
Hello Fab,
the email address must exists in your tenant – user, shared mailbox, etc. You can’t put there anything, there’re limitations.
Hello Tom,
I got this error when I try to use your method:
A potentially dangerous Request.Path value was detected from the client (<).
What could be the problem?
Thank you.
Hello Stefano,
I’ve never seen this error, did you remove all the < and > from the Uri when replacing the placeholders with dynamic contents?
Het Tom, nice article. I had a quick question. If we have turned on Version History on the SharePoint list, Updating the Author, will it change Author in the item version history too?
Hello Sravan,
yes, it will. Even though it’s shown in a different section in the version history it’s still just an item property.
I wish I could get this working with Site Pages Authors!
Has anyone had any success with this?
Hello John,
I tried it on Site Pages with no success, I guess there might be some limitation regarding that library.
You made my day with this! A whole bunch of articles with references to Claims (IDs), etc. and all I was trying to do was update my SP item WITHOUT using Update Item, but while looking up manager! Worked like a charm and… THANK YOU!
Hi,
I’m trying to do this but it’s giving “The type of data at position 4 is different than the one expected.”
“formValues”:[
{
“FieldName”: “Author”,
“FieldValue”: “[{‘Key’:’i:0#.f|membership|@{body(‘Get_response_details’)?[‘responder’]}’}]”
},
{
“FieldName”: “Editor”,
“FieldValue”: “[{‘Key’:’i:0#.f|membership|@{body(‘Get_response_details’)?[‘responder’]}’}]”
}
],
“bNewDocumentUpdate”: true
the responder is the users username@domain.com should it be actual.email@domain.com?
Hello Steven,
I’d double check all the single/double quotes used in the request body, I think I’ve seen this issue when there was some misalignment among them.
Hi, Is it possible to apply it for the library?
Hello Hyunh,
I suppose it should work also for documents in a library.
Hi Tom, is it possible to replace the default created by value with a dynamic value instead of a single predefined email address?
Hello Nikola,
yes, you can use dynamic content instead of a fixed address in the HTTP request which can change per flow run.
Hi Tom,
In my flow test results, the HTTP request output is showing that the author and editor fields are/should be updating properly, but in reality the actual item is not updating in my sharepoint list. I added a ‘get item’ step directly after the HTTP request step within my flow so that I could easily compare the sequential field values from within my run tests, and it is definitely not working. Not sure why that would be – do I have to unlock the created by and modified by fields before hand? I’ve triple checked my body code, and the HTTP request output LOOKS like it should be working, but I can’t figure out what I’m doing wrong.
I also get the same result: the output doesn’t show any error, but the Author is not changed.
Hello Aidan,
you don’t need to unlock anything, if there’s no error message in the http request output then it should work.
Hi Tom:
I am trying to change the Author in a SharePoint Document Library ( Not a List) I cannot figure out the URI to point to the proper file.
Hello Gary,
it’s the same as with item, get the file id and update it.
Any updates on author not updating after flow runs successfully?
I am trying to update file in doc lib – all good runs without errors, but no results or new version is created. Any help?
Hello Igor,
I’d check the http request output whether it gives you more information.
Thanks for this, I had high hopes but can’t get it to work…
I get error code -2146232832 with message “We couldn’t find an exact match.”
I’m not sure what the ‘match’ is referring to since I’ve checked the names of the columns and they’re no different to yours:
{
“formValues”:[
{
“FieldName”: “Author”,
“FieldValue”: “[{‘Key’:’i:0#.f|membership|me@overthere.com’}]”
},
{
“FieldName”: “Editor”,
“FieldValue”: “[{‘Key’:’i:0#.f|membership|me@overthere.com’}]”
}
],
“bNewDocumentUpdate”: true
}
I have used this wonderful trick on many sites over the past 2 years, but for some reason – on a site that I swore it used to work on, I can no longer update the “Author” field this way.
– It’s a one-step Flow. “For the selected file” > “Send HTTP Request to SP”
– It’s the same code I use successfully *still* on other sites in our cloud environment.
– I’m only editing the Author field. I have “bNewDocumentUpdate”:true.
– All my quote marks are double/single appropriately.
– I get no error message. It says the flow ran successfully.
– It’s for a Document Library. And it doesn’t work on Files or Folders. (I want it to work for Folders, but tested on Files too.)
– If I change to “Editor” field – it works. It just won’t work on “Author” field.
– I’m a site collection admin and it’s running on my account.
Anyone have any other ideas of what the glitch might be? Thanks!
Thank you for this it is really useful
I use this in copying lists from site-to-site. One thing I encountered in some instances is for the account associated with ‘Created By’ for example, that account in our tenant has since been disabled. So, while the HTTP request did not report an error, the ‘Created By’ field was left with my credentials rather than that of the person / account intended.
Thanks , It works and It was really useful.
I was hoping to use this to retain the Editor and Author fields when updating item approval status in a SharePoint list using a Power Automate flow. The flow itself – and the API call – run successfully without any errors. However, when I check the list the Editor field shows the name of the person who executed the flow as the Editor, not the original Editor value I am passing in the flow. I have tried running the flow with “bNewDocumentUpdate” set to true and also set to false, but the result is always the same. Another thing that puzzles me is I thought that flag dictated if a new version is created or not. Regardless of what I set it to, item history shows a version being created at the time the flow ran.
For those who got this working to set Editor appropriately via a flow, did you have to do anything additional to get this to work?