Microsoft Security | Microsoft Graph
An API that connects multiple Microsoft services, enabling data access and automation across platforms
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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(
url='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 location.
Any idea ?
An API that connects multiple Microsoft services, enabling data access and automation across platforms