spo term get
Gets information about the specified taxonomy term
Usage
m365 spo term get [options]
Options
-u, --webUrl [webUrl]
If specified, allows you to get a term from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.
-i, --id [id]
ID of the term to retrieve. Specify
name
orid
but not both.-n, --name [name]
Name of the term to retrieve. Specify
name
orid
but not both.--termGroupId [termGroupId]
ID of the term group to which the term set belongs. Specify
termGroupId
ortermGroupName
but not both.--termGroupName [termGroupName]
Name of the term group to which the term set belongs. Specify
termGroupId
ortermGroupName
but not both.--termSetId [termSetId]
ID of the term set to which the term belongs. Specify
termSetId
ortermSetName
but not both.--termSetName [termSetName]
Name of the term set to which the term belongs. Specify
termSetId
ortermSetName
but not both.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
When retrieving term by its ID, it's sufficient to specify just the ID. When retrieving it by its name however, you need to specify the parent term group and term set using either their names or IDs.
To use this command without the --webUrl option you have to have permissions to access the tenant admin site.
When using the --webUrl
option you can connect to the term store with limited permissions, and do not need the SharePoint Administrator role. You need to be a site visitor or more. It allows you to get a term from the tenant term store as well as a term from the sitecollection term store.
Examples
Get information about a taxonomy term using its ID from the specified sitecollection.
m365 spo term get --webUrl https://contoso.sharepoint.com/sites/project-x --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb
Get information about a taxonomy term using its ID.
m365 spo term get --id 0e8f395e-ff58-4d45-9ff7-e331ab728beb
Get information about a taxonomy term using its name, retrieving the parent term group and term set using their names.
m365 spo term get --name IT --termGroupName People --termSetName Department
Get information about a taxonomy term using its name, retrieving the parent term group and term set using their IDs.
m365 spo term get --name IT --termGroupId 5c928151-c140-4d48-aab9-54da901c7fef --termSetId 8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f
Response
- JSON
- Text
- CSV
- Markdown
{
"CreatedDate": "2021-07-07T09:42:02.283Z",
"Id": "2b5c71a6-d72b-49a8-a3bf-d80636d85b44",
"LastModifiedDate": "2021-07-07T09:42:02.283Z",
"Name": "IT",
"CustomProperties": {},
"CustomSortOrder": null,
"IsAvailableForTagging": true,
"Owner": "NT Service\\SPTimerV4",
"Description": "",
"IsDeprecated": false,
"IsKeyword": false,
"IsPinned": false,
"IsPinnedRoot": false,
"IsReused": false,
"IsRoot": true,
"IsSourceTerm": true,
"LocalCustomProperties": {},
"MergedTermIds": [],
"PathOfTerm": "IT",
"TermsCount": 1
}
CreatedDate : 2021-07-07T09:42:02.283Z
CustomProperties : {}
CustomSortOrder : null
Description :
Id : 2b5c71a6-d72b-49a8-a3bf-d80636d85b44
IsAvailableForTagging: true
IsDeprecated : false
IsKeyword : false
IsPinned : false
IsPinnedRoot : false
IsReused : false
IsRoot : true
IsSourceTerm : true
LastModifiedDate : 2021-07-07T09:42:02.283Z
LocalCustomProperties: {}
MergedTermIds : []
Name : IT
Owner : NT Service\SPTimerV4
PathOfTerm : IT
TermsCount : 1
CreatedDate,Id,LastModifiedDate,Name,IsAvailableForTagging,Owner,Description,IsDeprecated,IsKeyword,IsPinned,IsPinnedRoot,IsReused,IsRoot,IsSourceTerm,PathOfTerm,TermsCount
2021-07-07T09:42:02.283Z,2b5c71a6-d72b-49a8-a3bf-d80636d85b44,2021-07-07T09:42:02.283Z,IT,1,NT Service\SPTimerV4,,,,,,,1,1,IT,1
# spo term get --termGroupName "People" --termSetName "Department" --name "IT"
Date: 5/8/2023
## IT (2b5c71a6-d72b-49a8-a3bf-d80636d85b44)
Property | Value
---------|-------
CreatedDate | 2021-07-07T09:42:02.283Z
Id | 2b5c71a6-d72b-49a8-a3bf-d80636d85b44
LastModifiedDate | 2021-07-07T09:42:02.283Z
Name | IT
IsAvailableForTagging | true
Owner | NT Service\SPTimerV4
Description |
IsDeprecated | false
IsKeyword | false
IsPinned | false
IsPinnedRoot | false
IsReused | false
IsRoot | true
IsSourceTerm | true
PathOfTerm | IT
TermsCount | 1