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 / Rename a Sharepoint fo...
Power Automate
Answered

Rename a Sharepoint folder

(0) ShareShare
ReportReport
Posted on by 262

I am trying to rename a Sharepoint Folder, it is currently failing at this point

Skybluekid_2-1694678164485.png

 

With an error "Microsoft.SharePoint.Client.InvalidClientQueryException" 

Skybluekid_1-1694678017248.png

Any suggestion, would be appreciated.

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    12,081 Super User 2026 Season 1 on at

    Hi  @Skybluekid ,


    Please see the following below.  You need to use the Item ID for this method:

    ekarim2020_1-1694682130215.png

     

    USAGE

    Method: POST

    Uri:

    _api/web/lists/GetbyTitle('<Document Library Name'>)/items(<item-ID>)/validateUpdateListItem

    Body:
    {
      "formValues": [
       {
          "FieldName": "FileLeafRef",
          "FieldValue": "<new-folder-name>"
       }
      ]
    }

     

     

    For more info on this, see : How to Rename a SharePoint Folder or File Using REST API with Power Automate

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Skybluekid Profile Picture
    262 on at

    Hi @ekarim2020 

     

    Thank you for the reply.  I am still new to this, the folder that I want to change is not in the root folder.  

     

    Is the correct information in the URi

    _api/web/lists/GetbyTitle('/Documents/General/*******/Completed ECR's')/items(6383)/validateUpdateListItem

  • Verified answer
    Ellis Karim Profile Picture
    12,081 Super User 2026 Season 1 on at

    That shouldn't matter. As long as we are referencing the item's ID (file or folder) we should be able to rename it.

     

    Please see the following example:

     

    ekarim2020_1-1694704347881.png

     

     

    ekarim2020_2-1694704474551.png

     

    ekarim2020_3-1694704649925.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as ☑️ Solved.
    If you like my response, please give it a Thumbs Up.
    My Blog Site

  • Skybluekid Profile Picture
    262 on at

    Thank you very much

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 632

#2
Haque Profile Picture

Haque 458

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard