Forum Discussion
GRAPH API error: Create Upload Session: HTTP result - 409 Conflict
Has anyone encounter issues when using https://learn.microsoft.com/en-us/graph/api/resources/driveitem?view=graph-rest-1.0#instance-attributes? Particularly the property
microsoft.graph.conflictBehavior with "replace" when there's a conflict?
In my case, I use SAS Studio to send files from Linux to SharePoint. A SAS macro with Graph API was used to upload from Linux to SharePoint. The Graph API did not follow the provided ConflictBehavior to "replace" the existing file.
It was working as of June 2nd, 2025, USA time. Not anymore on June 3rd, 2025. None of my process or files was changed.
Does anyone have any insight?
Thank you,
Jerry
4 Replies
- tzengyCopper Contributor
I should've mentioned....
If trying to replace a file right after the first try, for example, within minutes, it will not work. It will work only when a prior upload session times out.
How about trying "rename" instead of "replace" to see whether the PAI correctly process the request.
- tzengyCopper Contributor
Thanks for the suggestion, that did not work either.
- tzengyCopper Contributor
Thank you for the response. "rename" still failed. The message was the same:
NOTE: 409 Conflict
NOTE: PROCEDURE HTTP used (Total process time):
real time 0.17 seconds
cpu time 0.01 seconds
NOTE: Create Upload Session: HTTP result - 409 Conflict
WARNING: Upload session not created!
{
"error": {
"code": "nameAlreadyExists",
"message": "A file with the same name is currently being uploaded. Change the filename and try to save again.",
"innerError": {
"date": "2025-06-04T12:15:26",