TermStore.CreateGroup Method

Definition

Overloads

CreateGroup(String)

Creates a new Group object in this TermStore.

CreateGroup(String, Guid)

Creates a new Group object in a TermStore.

CreateGroup(String)

Creates a new Group object in this TermStore.

public:
 Microsoft::SharePoint::Taxonomy::Group ^ CreateGroup(System::String ^ name);
public Microsoft.SharePoint.Taxonomy.Group CreateGroup (string name);
member this.CreateGroup : string -> Microsoft.SharePoint.Taxonomy.Group
Public Function CreateGroup (name As String) As Group

Parameters

name
String

The name of the new Group being created

Returns

Group

The newly created Group

Exceptions

The current user has insufficient permissions to perform this operation.

Group names must be unique.

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

Remarks

The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters: ;"<>|&tab

Additionally the name must be a unique Group name within the current TermStore.The current user must have TaxonomyRights.ManageTermStore permission in order to use this method. Call the CommitAll() method to save this change to the database.

Applies to

CreateGroup(String, Guid)

Creates a new Group object in a TermStore.

public:
 Microsoft::SharePoint::Taxonomy::Group ^ CreateGroup(System::String ^ name, Guid groupId);
[Microsoft.SharePoint.Client.ClientCallableMethod(ClientLibraryTargets=Microsoft.SharePoint.Client.ClientLibraryTargets.NonRESTful, ReturnObjectIdentity=true)]
public Microsoft.SharePoint.Taxonomy.Group CreateGroup (string name, Guid groupId);
member this.CreateGroup : string * Guid -> Microsoft.SharePoint.Taxonomy.Group
Public Function CreateGroup (name As String, groupId As Guid) As Group

Parameters

name
String

The name of the new Group being created.

groupId
Guid

The ID of the new Group being created.

Returns

Group
Attributes
ClientCallableMethodAttribute

Exceptions

The current user has insufficient permissions to perform this operation.

Group names must be unique.

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

Remarks

The name cannot exceed 255 characters, and it cannot contain any of the following illegal characters: ; " < > | & tab.

In addition, the name must be a unique group name within the current TermStore.

The current user must have ManageTermStore permission in order to use this method.

CommitAll() must be called in order to save this change to the database.

Applies to