SharePoint / SharePoint/sp-dev-docs
_api/site/CreateCopyJobs does not work with file in multiple document sets
Open
@Ashlesha-MSFT is already working on this.
Since Apr 23, 2025.
Needs: Triage :mag:
sharepoint-developer-support
type:bug-confirmed
type:bug-suspected
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
SharePoint REST API
Developer environment
Windows
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
Running an HTTP request to SharePoint in PowerAutomate
Describe the bug / error
When attempting to run the _api/site/CreateCopyJobs where the file in exportObjectUri exist in multiple documents sets a bad gateway error is returned.
api works for files within the same document sets
Steps to reproduce
- Create 2 documentsets in a document library and add in files to both document sets
- Create a test flow in PowerAutomate
- Add in a Send an Http request to SharePoint action
- Set Site Address: https://contoso.sharepoint.com/sites/TestSite
- Set Method: Post
- Uri: _api/site/CreateJobs
- {
"exportObjectUris": [
"https://contoso.sharepoint.com/sites/TestSite/SharedDocuments/DocumentSet1/FileOne.pdf",
"https://contoso.sharepoint.com/sites/TestSite/SharedDocuments/DocumentSet2/FileTwo.pdf"
],
"destinationUri": "https://contoso.sharepoint.com/sites/TestSite/Test/ShareDocuments",
"options": {
"IgnoreVersionHistory": true,
"IsMoveMode": false,
"AllowSchemaMismatch": true,
"NameConflictBehavior": 1
}
}
result:
Expected behavior
Files from multiple document sets to be copied to destinationUri
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.