Forum Discussion
CopyTo failing between Office 365 groups
I was building a demo to show a client how the CopyTo functionality would work between site collections to prove that basic metadata such as Modified Date etc is maintained when I hit a bug.
Using 2 new site collections created using the Team Site option from the new (can we still call it new?) SharePoint landing page. Both sites were basic Group sites with nothing added. I uploaded a few files into the document library of the first and then used the CopyTo functionality to try and copy the files to the new destination site collection.
Absolutely nothing happened.. I tried the same files to a different site collection and it was fine. Back to the original destination site.. no luck. I then tried with Fiddler running and I'm seeing a 404 not found when it executes the call to
"https://xxxxxxxxxxxxxxxxxx.sharepoint.com/sites/SourceSite/_api/SP.List.GetListDataAsStream?listFullUrl='https%3A%2F%2Fxxxxxxxxxxxxxxxxxx%2Esharepoint%2Ecom%2Fsites%2FDestSite%2FShared%20Documents'&View=&RootFolder=%2Fsites%2FDestSite%2FShared%20Documents&SortField=LinkFilename&SortDir=Asc"
But if I cut and paste that URL from Fiddler and open it in the browser, I get the expected JSON data response.
I created another site from the same Create Site location and I have the same problem 404 not found when trying to get the target document library. If you create a folder in the target location and then try to target the folder in the copy to pane, you receive the error "Sorry, we couldn't get the list of folders."
Older groups are working fine and I'm testing now with groups created from the Teams interface.
- Failing for Team Sites created from the Teams interface too.
Checking the fiddler requests, I can't see any difference between a working and a failing request other than the endpoint is a different site collection (And the working site collection was created previous to this testing.)
Failing
POST https://xxxxxxxxxxxxx.sharepoint.com/sites/SourceSite/_api/SP.List.GetListDataAsStream?listFullUrl='https%3A%2F%2Fxxxxxxxxxxxxx%2Esharepoint%2Ecom%2Fsites%2FNewTeam4Copy%2FShared%20Documents'&View=&RootFolder=%2Fsites%2FNewTeam4Copy%2FShared%20Documents%2FGeneral&SortField=LinkFilename&SortDir=Asc&FilterField1=FSObjType&FilterValue1=1 HTTP/1.1Origin: https://xxxxxxxxxxxxx.sharepoint.comReferer: https://xxxxxxxxxxxxx.sharepoint.com/sites/SourceSite/Shared%20Documents/Forms/AllItems.aspx
WorkingPOST https://xxxxxxxxxxxxx.sharepoint.com/sites/SourceSite/_api/SP.List.GetListDataAsStream?listFullUrl='https%3A%2F%2Fxxxxxxxxxxxxx%2Esharepoint%2Ecom%2Fsites%2FPublicGroupForTeams%2FShared%20Documents'&View=&RootFolder=%2Fsites%2FPublicGroupForTeams%2FShared%20Documents&SortField=LinkFilename&SortDir=Asc&FilterField1=FSObjType&FilterValue1=1 HTTP/1.1Origin: https://xxxxxxxxxxxxx.sharepoint.comReferer: https://xxxxxxxxxxxxx.sharepoint.com/sites/SourceSite/Shared%20Documents/Forms/AllItems.aspx
- I have just tested it with a Group site copying a file to a Teams site and it worked as expected