web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Bad Gateway on HTTP re...
Power Automate
Unanswered

Bad Gateway on HTTP request to change Modified By back to previous user

(0) ShareShare
ReportReport
Posted on by 242

Hi there

 

Scenario:

Flow updates the title field of a SharePoint library item with the document's name.

The flow changes Modified By and Modified to me (as the Flow creator). I need to revert the Modified By field back to whoever modified the file last.

 

I'm following this thread:

https://powerusers.microsoft.com/t5/Building-Flows/Update-the-Created-By-AuthorID-Field-of-a-SharePoint-Online-List/m-p/719054#M437

 

Note that thread focuses on the Created by. I'm working with Modified by.

 

The HTTP request to unlock works.

Then I get BadGateway error on the next HTTP Request for UpdateModifiedByFieldOnceApproved (second last action). Flow run timed out. Please try again.

 

Screen Shot 2023-06-16 at 2.19.47 pm.png

 

Screen Shot 2023-06-16 at 2.21.33 pm.png

Screen Shot 2023-06-16 at 2.24.25 pm.png

 

Screen Shot 2023-06-16 at 2.24.56 pm.png

 

Any help would be greatly appreciated.

 

 

Thanks @SudeepGhatakNZ for your help so far.

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @Nived_Nambiar , @ManishSolanki , what do you think?

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @spinneroo 

     

    Pls refer the below post where I had provided the solution for updating created by or Creator field:

    Solved: Re: Updating the "Created By" field in SharePoint ... - Power Platform Community (microsoft.com)

     

    In the same way, you can update the Modified by or Modifier field 🙂

     

    Hi @SudeepGhatakNZ 

     

    I need some time to check the flow but, in the meanwhile, we can check if already posted solution works for @spinneroo 

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • spinneroo Profile Picture
    242 on at

    Hello @ManishSolanki 

    Thank you for your reply.

    The post you refer to is different to the one I have been following.

    The HTTP request method is POST, whereas the one that I have been following is PATCH.

    I'm sorry, but you'll need to be a little more specific with me, as I'm still learning. I'm happy to change but I need some advice on how to get the Modified By's email address for the body of the request.

     

    "FieldValue": "[{'Key':'i:0#.f|membership|<pass email of a user>'}]"

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @spinneroo 

     

    You can pass directly the modified by email address there (via dynamic content as well)

     

    https://www.c-sharpcorner.com/article/how-to-update-createdmodified-by-in-sharepoint-list-item-using-power-automate/

     

     

  • spinneroo Profile Picture
    242 on at

    Thank you @Nived_Nambiar 

    I've applied the changes but the flow failed on the second HTTP request: Status 409, because has been modified by the user.

     

    Screen Shot 2023-06-19 at 10.36.20 am.png

     

    Screen Shot 2023-06-19 at 10.35.24 am.png

     

     

     

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @spinneroo 

     

    Pls check if the FieldValue is being set in proper format as shown in the below screenshot:

    ManishSolanki_0-1687152555604.png

    "FieldValue": "[{'Key':'i:0#.f|membership|<pass email of a user>'}]"

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • spinneroo Profile Picture
    242 on at

    Hi @ManishSolanki 

    I tested a new document with a test account to change a document name.

    This is what I have in the body:

     

    {
     "formValues": [{
     "FieldName": "Editor",
     "FieldValue": "[{'Key':'i:0#.f|membership|<my email address>'}]"
     }]
    }

     

    Where 'my email address' is the Modified By claims, so looks like I've got it right.

    It's now saying 'Item does not exist. It may have been deleted by another user.' But it does exist ...

  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @spinneroo 

     

    Pls check the ID of the list item or file which is being used as URI input field. It should be a valid ID in SharePoint library.

     

    If this helps, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • spinneroo Profile Picture
    242 on at

    Hi @ManishSolanki 

     

    It says Bad Gateway

     

    Screen Shot 2023-06-20 at 8.42.57 am.png

  • spinneroo Profile Picture
    242 on at

    This hasn't been resolved yet 🙁

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard