Notifications
Announcements
I am trying to rename a Sharepoint Folder, it is currently failing at this point
With an error "Microsoft.SharePoint.Client.InvalidClientQueryException"
Any suggestion, would be appreciated.
Hi @Skybluekid ,
Please see the following below. You need to use the Item ID for this method:
USAGEMethod: POSTUri:_api/web/lists/GetbyTitle('<Document Library Name'>)/items(<item-ID>)/validateUpdateListItemBody:{ "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
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
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:
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 538 Super User 2025 Season 2
Tomac 405 Moderator
abm abm 252 Most Valuable Professional