Table of contents
Collapse the table of content
Expand the table of content

TaxonomyExtensions.EnsureTermGroup Method

SharePoint Dev Documents|Last Updated: 5/20/2017
1 Contributor

Ensures the named group exists, returning a reference to the group, and creating or updating as necessary.

Assembly: OfficeDevPnP.Core.dll


public static TermGroup EnsureTermGroup(this Site site, String groupName, Guid groupId, String groupDescription)



  Type: Microsoft.SharePoint.Client.Site
  Site connected to the term store to use


  Type: System.String
  Name of the term group

(optional) groupId

  Type: System.Guid
  (Optional) ID of the group; if not provided the parameter is ignored, a random GUID is used if necessary to create the group, otherwise if the ID differs a warning is logged

(optional) groupDescription

  Type: System.String
  (Optional) Description of the term group; if null or not provided the parameter is ignored, otherwise the group is updated as necessary to match the description; passing an empty string will clear the description

Return Value

Type: TermGroup
The required term group

See also

© 2018 Microsoft