Sharepoint Online Can't create DocumentSet with OfficeDev PnP

Copper Contributor

Hello,

 

I am using the OfficeDev.Core to create DocumentSet "Folder" in sharepoint Online in a Provider Hosted Add-in in C#.

 

I am using the lastest CSOM C# library for Sharepoint On line :

Microsoft.SharePoint.Client.dll V16.1.5813.1200

Microsoft.SharePoint.Client.DocumentManagement.dll V16.1.5813.1200

 

This was working fine for months and yesterday we notice that the method Create from the class  Microsoft.SharePoint.Client.DocumentSet.DocumentSet return an error unknown !

 

I use a AppOnly Access Token with highest permissions.

 

Do you have any ideas or workarounds to create a documentset with CSOM ?

 

Thanks

 

PS: I try to create this documentset with the UI and it works fine.

 

 

 

3 Replies

I find a solution on this post:


http://sharepoint.stackexchange.com/questions/199336/creating-document-sets-with-sharepoint-csom-api...


I experienced the same issue on my tenant on monday morning 14/11/2016

 

The creation of the documentset stop working suddenly

 

The existing code :

 

var devisCT = globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis);
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);

 

and solution that works for me is :

 

var devisCT = devisLib.GetContentTypeByName(SPConstants.CTName_Devis); 
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);

 

I now take the content type from the Library where I want to create the documentset.

 

The ContentTypeId retrieved is longuer and this ID works.

 

You can notice that I use the method GetContentTypeByName and it works as well as the GetContentTypeByID.

 

 

I find a solution on this post:

http://sharepoint.stackexchange.com/questions/199336/creating-document-sets-with-sharepoint-csom-api...

I experienced the same issue on my tenant on monday morning 14/11/2016
 
The creation of the documentset stop working suddenly
 
The existing code :
 

var devisCT = globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis);
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);

 
and solution that works for me is :
 

var devisCT = devisLib.GetContentTypeByName(SPConstants.CTName_Devis); 
dsQuoteFolder = rootFolder.CreateDocumentSet(folderName, devisCT.Id);

 
I now take the content type from the Library where I want to create the documentset.
 
The ContentTypeId retrieved is longuer and this ID works.
 
You can notice that I use the method GetContentTypeByName and it works as well as the GetContentTypeByID.
 
 

We are having the same issue with an app that has been working for a couple years.