OneDriveAPI icon indicating copy to clipboard operation
OneDriveAPI copied to clipboard

[BUG] CreateFolder not working

Open frank4040 opened this issue 1 year ago • 1 comments

Hi Koen,

Love your work! This is the first API I came across that actually works on private Onedrives. The only thing that does not seem to be working is creating a folder. When calling GetFolderOrCreate on a non existing folder, it always returns null and no folder is created (same when directly calling CreateFolder or CreateFolderInternal). This is BTW also the case in the included demo app. Am I doing something wrong here? Or was there a change in the Graph API that causes this?

says:

POST https://graph.microsoft.com/v1.0/me/drive/root/children
Content-Type: application/json
{
  "name": "New Folder",
  "folder": { },
  "@microsoft.graph.conflictBehavior": "rename"
}

The last parameter seems to be missing, but I guess there should be some default behavior and not make the call break. Even tried adding the parameter myself, but still the same result (could also be me doing it wrong)

Running on Windows 11, Visual Studio 2022, .NET Framework 4.8.

I'm puzzled, can't seem to make this work. Please help!

frank4040 avatar May 11 '24 10:05 frank4040

https://github.com/KoenZomers/OneDriveAPI/pull/46

ispysoftware avatar Nov 14 '24 07:11 ispysoftware