I'm working on a C# project with these requirements:
- Create a Folder if it doesn't exits
- Check if the already exists, if it exists increment the file name.
From Onedrive API documentation Create a new Folder in OneDrive, it says that setting @microsoft.graph.conflictBehavior=rename would increment the folder value if it exists
how can I add the @microsoft.graph.conflictBehavior into my request?
Here's the code which creates the folder using drive Item
var foldertoCreate = new DriveItem {
Name = $"TestFolder",
Folder = new Folder (),
};
var newFolder = await _graphClient.Drive
.Items["MyParent_Item_Id"]
.Children
.Request ()
.AddAsync (foldertoCreate);