Skip to main content

spo term set list

Lists taxonomy term sets from the given term group

Usage

m365 spo term set list [options]

Options

-u, --webUrl [webUrl]

If specified, allows you to list term sets from the tenant term store as well as the sitecollection specific term store. Defaults to the tenant admin site.

--termGroupId [termGroupId]

ID of the term group from which to retrieve term sets. Specify termGroupName or termGroupId but not both.

--termGroupName [termGroupName]

Name of the term group from which to retrieve term sets. Specify termGroupName or termGroupId 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 is options.

--query [query]

JMESPath query string. See http://jmespath.org/ for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.

--verbose

Runs command with verbose logging.

--debug

Runs command with debug logging.

Remarks

info

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 list term sets from the tenant term store as well as term sets from the sitecollection term store.

Examples

List taxonomy term sets from the term group with the given name.

m365 spo term set list --termGroupName PnPTermSets

List taxonomy term sets from the term group with the given ID.

m365 spo term set list --termGroupId 0e8f395e-ff58-4d45-9ff7-e331ab728beb

List taxonomy term sets from the specified sitecollection, from the term group with the given name.

m365 spo term set list --termGroupName PnPTermSets --webUrl https://contoso.sharepoint.com/sites/project-x

Response

[
{
"_ObjectType_": "SP.Taxonomy.TermSet",
"_ObjectIdentity_": "676eb2a0-80e7-2000-3976-610eb3f5a91e|fec14c62-7c3b-481b-851b-c80d7802b224:se:aCf0Cz4D9UOS7+b/OlUY5XrNqUp10tpPhLK4MIXc7g/qydiOUnAdTKTXucEL/+pv",
"CreatedDate": "2019-09-03T06:41:32.110Z",
"Id": "8ed8c9ea-7052-4c1d-a4d7-b9c10bffea6f",
"LastModifiedDate": "2019-09-03T06:41:32.260Z",
"Name": "Department",
"CustomProperties": {
"SearchCenterNavVer": "15"
},
"CustomSortOrder": null,
"IsAvailableForTagging": true,
"Owner": "",
"Contact": "",
"Description": "",
"IsOpenForTermCreation": true,
"Names": {
"1033": "Department"
},
"Stakeholders": []
}
]
CTRL + M