Sharepoint Online Can't create DocumentSet with OfficeDev PnP

%3CLINGO-SUB%20id%3D%22lingo-sub-30110%22%20slang%3D%22en-US%22%3ESharepoint%20Online%20Can't%20create%20DocumentSet%20with%20OfficeDev%20PnP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30110%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20OfficeDev.Core%20to%20create%20DocumentSet%20%22Folder%22%20in%20sharepoint%20Online%20in%20a%20Provider%20Hosted%20Add-in%20in%20C%23.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20lastest%20CSOM%20C%23%20library%20for%26nbsp%3BSharepoint%20On%20line%20%3A%3C%2FP%3E%3CP%3EMicrosoft.SharePoint.Client.dll%20V16.1.5813.1200%3C%2FP%3E%3CP%3EMicrosoft.SharePoint.Client.DocumentManagement.dll%20V16.1.5813.1200%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20was%20working%20fine%20for%20months%20and%20yesterday%26nbsp%3Bwe%20notice%20that%20the%26nbsp%3Bmethod%20Create%26nbsp%3Bfrom%20the%20class%20%26nbsp%3BMicrosoft.SharePoint.Client.DocumentSet.DocumentSet%20return%20an%20error%20unknown%20!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20use%20a%20AppOnly%20Access%20Token%20with%20highest%20permissions.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20have%20any%20ideas%20or%20workarounds%20to%20create%20a%20documentset%20with%20CSOM%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPS%3A%20I%20try%20to%20create%20this%20documentset%20with%20the%20UI%20and%20it%20works%20fine.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30769%22%20slang%3D%22en-US%22%3ERe%3A%20Sharepoint%20Online%20Can't%20create%20DocumentSet%20with%20OfficeDev%20PnP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30769%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20having%20the%20same%20issue%20with%20an%20app%20that%20has%20been%20working%20for%20a%20couple%20years.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30153%22%20slang%3D%22en-US%22%3ERe%3A%20Sharepoint%20Online%20Can't%20create%20DocumentSet%20with%20OfficeDev%20PnP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30153%22%20slang%3D%22en-US%22%3E%3CP%3EI%20find%20a%20solution%20on%20this%20post%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fsharepoint.stackexchange.com%2Fquestions%2F199336%2Fcreating-document-sets-with-sharepoint-csom-api%2F199718%23199718%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fsharepoint.stackexchange.com%2Fquestions%2F199336%2Fcreating-document-sets-with-sharepoint-csom-api%2F199718%23199718%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20experienced%20the%20same%20issue%20on%20my%20tenant%20on%20monday%20morning%2014%2F11%2F2016%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EThe%20creation%20of%20the%20documentset%20stop%20working%20suddenly%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EThe%20existing%20code%20%3A%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3Evar%20devisCT%20%3D%20globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis)%3B%0AdsQuoteFolder%20%3D%20rootFolder.CreateDocumentSet(folderName%2C%20devisCT.Id)%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3CBR%20%2F%3Eand%20solution%20that%20works%20for%20me%20is%20%3A%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3Evar%20devisCT%20%3D%20devisLib.GetContentTypeByName(SPConstants.CTName_Devis)%3B%20%0AdsQuoteFolder%20%3D%20rootFolder.CreateDocumentSet(folderName%2C%20devisCT.Id)%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3CBR%20%2F%3EI%20now%20take%20the%20content%20type%20from%20the%20Library%20where%20I%20want%20to%20create%20the%20documentset.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EThe%20ContentTypeId%20retrieved%20is%20longuer%20and%20this%20ID%20works.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3EYou%20can%20notice%20that%20I%20use%20the%20method%20GetContentTypeByName%20and%20it%20works%20as%20well%20as%20the%20GetContentTypeByID.%3CBR%20%2F%3E%26nbsp%3B%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-30148%22%20slang%3D%22en-US%22%3ERe%3A%20Sharepoint%20Online%20Can't%20create%20DocumentSet%20with%20OfficeDev%20PnP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-30148%22%20slang%3D%22en-US%22%3E%3CP%3EI%20find%20a%20solution%20on%20this%20post%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CA%20href%3D%22http%3A%2F%2Fsharepoint.stackexchange.com%2Fquestions%2F199336%2Fcreating-document-sets-with-sharepoint-csom-api%2F199718%23199718%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fsharepoint.stackexchange.com%2Fquestions%2F199336%2Fcreating-document-sets-with-sharepoint-csom-api%2F199718%23199718%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20experienced%20the%20same%20issue%20on%20my%20tenant%20on%20monday%20morning%2014%2F11%2F2016%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20creation%20of%20the%20documentset%20stop%20working%20suddenly%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20existing%20code%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3Evar%20devisCT%20%3D%20globalHostWeb.GetContentTypeByName(SPConstants.CTName_Devis)%3B%3CBR%20%2F%3EdsQuoteFolder%20%3D%20rootFolder.CreateDocumentSet(folderName%2C%20devisCT.Id)%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20solution%20that%20works%20for%20me%20is%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3Evar%20devisCT%20%3D%20devisLib.GetContentTypeByName(SPConstants.CTName_Devis)%3B%20%3CBR%20%2F%3EdsQuoteFolder%20%3D%20rootFolder.CreateDocumentSet(folderName%2C%20devisCT.Id)%3B%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20now%20take%20the%20content%20type%20from%20the%20Library%20where%20I%20want%20to%20create%20the%20documentset.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20ContentTypeId%20retrieved%20is%20longuer%20and%20this%20ID%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20notice%20that%20I%20use%20the%20method%20GetContentTypeByName%20and%20it%20works%20as%20well%20as%20the%20GetContentTypeByID.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New 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
Highlighted

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.

 

 

Highlighted

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.
 
 

Highlighted

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