How to move item specifying @microsoft.graph.conflictBehavior
Hello,
I need to move items but need to set the @microsoft.graph.conflictBehavior to replace.
What I’m currently trying to do in python but doesn’t set the @microsoft.graph.conflictBehavior strategy:
import requests
import json
requests.patch(
‘https://graph.microsoft.com/v1.0/drives/MYDRIVEID/items/MYITEMID?@microsoft.graph.conflictBehavior=replace’,
data=json.dumps({‘parentReference’: {‘driveId’: ‘MYDRIVEID’, ‘path’: ‘MYNEWPARENTLOCATION’}}),
headers={‘Authorization’: ‘Bearer MYTOKEN’, ‘Content-Type’: ‘application/json’, ‘Prefer’: ‘IdType=”ImmutableId”,bypass-shared-lock’}
)
This gives me error 409 conflict, but I want the replace to force the move of folder to its new parent locaiton.
Any idea ?
Thanks
Hello,I need to move items but need to set the @microsoft.graph.conflictBehavior to replace.What I’m currently trying to do in python but doesn’t set the @microsoft.graph.conflictBehavior strategy:import requests
import json
requests.patch(
‘https://graph.microsoft.com/v1.0/drives/MYDRIVEID/items/MYITEMID?@microsoft.graph.conflictBehavior=replace’,
data=json.dumps({‘parentReference’: {‘driveId’: ‘MYDRIVEID’, ‘path’: ‘MYNEWPARENTLOCATION’}}),
headers={‘Authorization’: ‘Bearer MYTOKEN’, ‘Content-Type’: ‘application/json’, ‘Prefer’: ‘IdType=”ImmutableId”,bypass-shared-lock’}
) This gives me error 409 conflict, but I want the replace to force the move of folder to its new parent locaiton. Any idea ? Thanks Read More