Create a OneDrive folder
files_create_folderCreates a folder in OneDrive at a specified parent path or ID, or in the drive root when omitted. Automatically resolves name conflicts by adding a numeric suffix.
Instructions
Creates a folder in the signed-in user's OneDrive and returns the created item. Give the parent as parentItemId or parentPath, or omit both for the drive root. A name collision does not fail: Graph renames the new folder with a numeric suffix, so read the returned name rather than assuming it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the new folder. An existing folder of the same name does not cause a failure; the new one gets a numeric suffix. | |
| parentPath | No | Path of the parent folder from the drive root, e.g. "Documents/Reports". Mutually exclusive with parentItemId. Omit both to create in the drive root. | |
| parentItemId | No | Id of the parent folder. Mutually exclusive with parentPath. Omit both to create in the drive root. |