将整个文件夹从其父文件夹移动到另一个文件夹

Move a whole folder from its parent folder to another

基于 this documentation,我能够像这样将文件从一个文件夹移动到另一个文件夹:

DriveItem file = await graphClient
    .Me
    .Drive
    .Items[fileId]
    .Request()
    .UpdateAsync(new DriveItem
    {
        Name = "New Name",
        ParentReference = new ItemReference
        {
            Path = "/drive/root:/New/Path"
        },
        AdditionalData = new Dictionary<string, object>
        { 
            { "@microsoft.graph.conflictBehavior", "rename" }
        }
    });

如果我使用相同的逻辑将整个文件夹从其父文件夹移动到另一个文件夹,我会收到此错误: \

InvalidRequest: Must provide one of the following facets to create an item: Bundle, File, Folder, RemoteItem

如果我在 DriveItem 属性中添加 Folder = new Folder{ },我会收到此错误:

InvalidRequest: Bad Argument

我实际上使用的是文件夹的路径,而不是它的 ID。

DriveItem file = await graphClient
    .Me
    .Drive
    .Root
    .ItemWithPath(path)
    .Request()
    //...

这似乎是请求失败的原因,原因不明。如果我使用 id (.Items[fileId]),它会起作用。