Graph SDK C# - Create a New Document Set in a SharePoint library

37 views Asked by At

I'm Trying to create a new document set in SharePoint using following code but it creates a folder instead of a document set.

              var newlyCreatedFolder = new Microsoft.Graph.DriveItem
                {
                    Name = parentFolderName,
                    Folder = new Microsoft.Graph.Folder
                    {
                        
                    },
                    AdditionalData = new Dictionary<string, object>()
                        {
                            {"@microsoft.graph.conflictBehavior", "rename"}
                        }

                };
                await graphClient.Sites[ecmConfig.BaseURL].Drives[driveId].Items
                        .Request()
                        .AddAsync(newlyCreatedFolder);
0

There are 0 answers