OneDrive Business icon

OneDrive Business

Access OneDrive Business files and folders

Folder → Rename

AI-generated

Summary

Renames a folder in OneDrive Business or a SharePoint document library.

Inputs

  • driveType (required) — Type of drive to access: user (OneDrive) or site (SharePoint).
  • userId (required) — User principal name or ID when driveType is user.
  • siteId (required) — SharePoint site ID when driveType is site.
  • folderId (required) — Folder item ID or path from drive root to rename.
  • newName (required) — New folder name.

Output shape

array of objects

Each object contains the updated folder metadata under json and a pairedItem reference to the input item index.

Examples

Example 1: Rename a folder using its ID in a user's OneDrive

driveType: user, userId: user@contoso.com, folderId: , newName: Archive

Example 2: Rename a folder via path in a SharePoint site document library

driveType: site, siteId: contoso.sharepoint.com,site-id,web-id, folderId: /Projects/OldName, newName: Projects

Links

Discussion