CopyFolderJob
Initiates an asynchronous copy job to replicate a SharePoint folder (and its contents) to a target location. Supports cross-site transfers, version history options, and conflict resolution behaviors.
Input
| Name | Type | Required | Description |
| SourceFolderUrl | String | True | URL of the folder to copy. Can be absolute (https://domain.sharepoint.com/site/mysite/Shared%20Documents/SourceFolder) or site-relative (/Shared%20Documents/SourceFolder). Must include document library name. |
| DestinationFolderUrl | String | True | URL where the folder will be copy to. Can be absolute (https://domain.sharepoint.com/site/mysite/Target) or site-relative (/Target). Parent folder must already exist. |
| AllowSchemaMismatch | Boolean | False | When true, allows the operation to proceed even if the source and destination libraries have different schemas or column configurations.
The default value is true. |
| AllowSmallerVersionLimit | Boolean | False | When true, allows moving content even if the destination library has a lower version limit than the source, which may result in version truncation.
The default value is true. |
| IgnoreVersionHistory | Boolean | False | When true, only the current version is copied. When false, preserves all version history during the copy operation.
The default value is true. |
| NameConflictBehavior | String | False | Controls handling when an item with the same name exists in the destination: FAIL (abort), REPLACE (overwrite), or RENAME (append unique suffix).
The allowed values are FAIL, REPLACE, RENAME. The default value is RENAME. |
| WaitJobToFinish | Boolean | False | When true, waits synchronously for the copy job to complete. When false, returns immediately with job tracking information for asynchronous status checks.
The default value is false. |
Result Set Columns
| Name | Type | Description |
| Success | Boolean | Indicates whether the copy operation was initiated successfully. Returns 'true' for success and 'false' for failure. |
| JobId | String | The GUID that uniquely identifies this copy job; use this value when polling Job Progress to retrieve status updates. |
| JobQueueUri | String | The URL of the Azure Storage Queue associated with this job; the system enqueues status / progress messages there. |
| EncryptionKey | String | A Base64-encoded AES key used to decrypt status messages in the JobQueueUri for this specific job. |
| ErrorMessage | String | Contains error details if the operation fails, otherwise empty. |