Group.CreateTermSet method (String, Guid, Int32)

Creates a new TermSet object in the current Group object by using the provided language and the specified unique identifier.

Namespace:  Microsoft.SharePoint.Taxonomy
Assembly:  Microsoft.SharePoint.Taxonomy (in Microsoft.SharePoint.Taxonomy.dll)


Public Function CreateTermSet ( _
    name As String, _
    newTermSetId As Guid, _
    lcid As Integer _
) As TermSet
Dim instance As Group
Dim name As String
Dim newTermSetId As Guid
Dim lcid As Integer
Dim returnValue As TermSet

returnValue = instance.CreateTermSet(name, _
    newTermSetId, lcid)
public TermSet CreateTermSet(
    string name,
    Guid newTermSetId,
    int lcid


  • newTermSetId
    Type: System.Guid

    The unique identifier of the new TermSet object that is being created

Return value

Type: Microsoft.SharePoint.Taxonomy.TermSet
The newly created TermSet object


Exception Condition

The current user has insufficient permissions to perform this operation.


Creating a term set in system group is disallowed.


The name parameter is invalid. It either contains invalid characters, is too long, or conflicts with the name of an existing term set in the same group.


The name cannot be a null reference (Nothing in Visual Basic) or empty.


The lcid is not one of the working languages for the term store


The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters

  1. ; " < > | & tab

Additionally the name parameter must be a unique TermSet name within the current Group and the newTermSetId value must be a unique ID across all TermSet objects in the TermStore. If it is already in use by another TermSet object, a TermStoreOperationException exception will be thrown during the CommitAll() transaction.The current user must have TaxonomyRights.EditTermSet permission to use this method. Call CommitAll() to save this change to the database.

See also


Group class

Group members

CreateTermSet overload

Microsoft.SharePoint.Taxonomy namespace




CreateTermSet(String, Guid)

CreateTermSet(String, Int32)