Rename a SharePoint Item

This procedure is part of the SharePoint Book (BDK). To use this book, you must first learn it in your agent.

Overview

This procedure renames a folder or a file using the Microsoft Graph API.

Input Concepts

Concept
Description
Type
Required
Default Value

item

A SharePoint file that will be renamed.

sharepoint file reference or sharepoint folder reference

Yes

N/A

name

The new name for the file.

text

Yes

N/A

conflict behavior

The behavior when a conflict occurs. Possible values are 'fail', 'replace', 'rename'.

text

No

rename

Examples

Rename a file

get a folder at "/My Site/My Documents/My Folder"
get the folder's items
rename the first item to "My New File.txt"

Last updated

Was this helpful?