TermStore.GetTerm method (Guid)

Gets a Term based on its ID.

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

public Term GetTerm(
	Guid termId
)

Parameters

termId
Type: System.Guid

The ID of the Term object to be retrieved

Return value

Type: Microsoft.SharePoint.Taxonomy.Term
A Term object with a matching ID, or a null reference (Nothing in Visual Basic) if the matching term cannot be found

ExceptionCondition
ArgumentNullException

The id value cannot be a Guid.Empty value.

If the current Term is a member of more than one TermSet objects, it will arbitrarily return the term from one of the TermSet objects. If the Term cannot be found or if the user does not have sufficient permissions to access it, the method returns null. This method searches for the Term object across all child groups and term sets that the user has permissions to read.

Show: