Execute the following POST requests using Graph Explorer:
POST /sites/{siteId}/drive/items/{itemId}/copy?@microsoft.graph.conflictBehavior=failPOST /sites/{siteId}/drive/items/{itemId}/copy?@microsoft.graph.conflictBehavior=replace
Verify whether the expected changes (failure or replacement) are reflected in the destination folder.
Category
Expected or Desired Behavior
Observed Behavior
@microsoft.graph.conflictBehavior=fail
Request URL: https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com,4f20fd5e-3823-4fec-9a56-c6198582cc38,add4404e-bedd-41b1-bf89-1f8bf8448835/drives/b!Xv0gTyM47E-aVsYZhYLMOE5A1K3dvrFBv4kfi_hEiDUC4dk5j550To8XhKkvly_P/items/01I6DYRGBKU3MFMZ267NFYLAKQYV74AMUQ/copy?@microsoft.graph.conflictBehavior=fail Request Method: POST Status Code: 202 Accepted
Request payload: { "parentReference": { "driveId": "b!ONRbavQ7EkqUVvxkZk7iwsG0k2jaSHdGokT03pzPj2McyJQwxcxPQowzM1mM5AAX", "id": "015Z3BZUF6Y2GOVW7725BZO354PWSELRRZ" } }
Response Headers: Client-Request-Id: 6a1c3875-a051-84ff-5b29-50cd5d1ce4ae Date: Mon, 01 Jan 2024 07:09:17 GMT Request-Id: 4e5bcf24-c583-47cf-8663-afed1139c1a7
@microsoft.graph.conflictBehavior=replace Request URL: https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com,4f20fd5e-3823-4fec-9a56-c6198582cc38,add4404e-bedd-41b1-bf89-1f8bf8448835/drives/b!Xv0gTyM47E-aVsYZhYLMOE5A1K3dvrFBv4kfi_hEiDUC4dk5j550To8XhKkvly_P/items/01I6DYRGBKU3MFMZ267NFYLAKQYV74AMUQ/copy?@microsoft.graph.conflictBehavior=replace Request Method: POST Status Code: 202 Accepted
Request payload: { "parentReference": { "driveId": "b!ONRbavQ7EkqUVvxkZk7iwsG0k2jaSHdGokT03pzPj2McyJQwxcxPQowzM1mM5AAX", "id": "015Z3BZUF6Y2GOVW7725BZO354PWSELRRZ" } }
Response Headers: Client-Request-Id: 2636e8ab-cd6d-6965-28c8-b2548293bfb6 Date: Mon, 01 Jan 2024 07:27:01 GMT Request-Id: 5f358d02-c7a6-4889-b5bf-197f0a241342
Steps to Reproduce
POST /sites/{siteId}/drive/items/{itemId}/copy?@microsoft.graph.conflictBehavior=fail
POST /sites/{siteId}/drive/items/{itemId}/copy?@microsoft.graph.conflictBehavior=replace
Thank you.