driveItem: copy ignores posted parentReference

Alex 1 Reputation point

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
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.
11,396 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RajeshKumarMSFT 1,971 Reputation points Microsoft Vendor

    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