driveItem: copy ignores posted parentReference

Alex 1 Reputation point
2022-04-20T10:27:37.227+00:00

When I try to copy a folder into the given parentReference folder it doesn’t work. The new folder always creates in the parent folder of the source copy folder, but not in the given parentReference folder.

That was different before the update of the Graph API on April 14, 2022. Before that it always maked the copy into the given parentReference folder.

This is my request:

POST /groups/{groupId}/drive/items/{copy-folder-id}/copy
/me/drive/items/{copy-folder-id}/copy
Content-Type: application/json

{
"parentReference": {
"driveId": "6F7D00BF-FC4D-4E62-9769-6AEA81F3A21B",
"id": "DCD0D3AD-8989-4F23-A5A2-2C086050513F"
},
"name": "New Folder"
}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,521 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RajeshKumarMSFT 1,971 Reputation points Microsoft Vendor
    2022-04-20T11:07:20.413+00:00

    Hi @Alex ,

    There is a open case with Microsoft Engineering team for the Driveitem-copy into same location.
    Will keep you informed about the progress.

    Related post: Graph API - Sharepoint copyItem with parentReference not working

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments