question

Alex-5269 avatar image
0 Votes"
Alex-5269 asked 35247258 edited

driveItem: copy ignores posted parentReference

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-files
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RajeshKumarMSFT-6137 avatar image
0 Votes"
RajeshKumarMSFT-6137 answered

Hi @Alex-5269,

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".

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.