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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rename a Sharepoint fo...
Power Automate
Unanswered

Rename a Sharepoint folder

(0) ShareShare
ReportReport
Posted on by 254

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
    11,681 Super User 2025 Season 2 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
    254 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
    11,681 Super User 2025 Season 2 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
    254 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard