Skip to main content

spo contenttype list

Lists content types from specified site

Usage

m365 spo contenttype list [options]

Options

-u, --webUrl <webUrl>

Absolute URL of the site for which to list content types.

-c, --category [category]

Category name of content types. When defined will return only content types from specified category.

-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.

Examples

Retrieve site content types.

m365 spo contenttype list --webUrl "https://contoso.sharepoint.com/sites/contoso-sales"

Retrieve site content types from the 'List Content Types' category.

m365 spo contenttype list --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --category "List Content Types"

Response

[
{
"ClientFormCustomFormatter": "",
"Description": "Create a new list item.",
"DisplayFormClientSideComponentId": "",
"DisplayFormClientSideComponentProperties": "",
"DisplayFormTarget": 0,
"DisplayFormTemplateName": "ListForm",
"DisplayFormUrl": "",
"DocumentTemplate": "",
"DocumentTemplateUrl": "",
"EditFormClientSideComponentId": "",
"EditFormClientSideComponentProperties": "",
"EditFormTarget": 0,
"EditFormTemplateName": "ListForm",
"EditFormUrl": "",
"Group": "PnP Content Types",
"Hidden": false,
"Id": {
"StringValue": "0x01007926A45D687BA842B947286090B8F67D"
},
"JSLink": "",
"MobileDisplayFormUrl": "",
"MobileEditFormUrl": "",
"MobileNewFormUrl": "",
"Name": "PnP Alert",
"NewFormClientSideComponentId": null,
"NewFormClientSideComponentProperties": "",
"NewFormTarget": 0,
"NewFormTemplateName": "ListForm",
"NewFormUrl": "",
"ReadOnly": false,
"SchemaXml": "<ContentType ID=\"0x01007926A45D687BA842B947286090B8F67D\" Name=\"PnP Alert\" Group=\"PnP Content Types\" Description=\"Create a new list item.\" Version=\"0\"><Folder TargetName=\"_cts/PnP Alert\" /><Fields><Field ID=\"{c042a256-787d-4a6f-8a8a-cf6ab767f12d}\" Name=\"ContentType\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"ContentType\" Group=\"_Hidden\" Type=\"Computed\" DisplayName=\"Content Type\" Sealed=\"TRUE\" Sortable=\"FALSE\" RenderXMLUsingPattern=\"TRUE\" PITarget=\"MicrosoftWindowsSharePointServices\" PIAttribute=\"ContentTypeID\" DelayActivateTemplateBinding=\"GROUP,SPSPERS,SITEPAGEPUBLISHING\" Customization=\"\"><FieldRefs><FieldRef ID=\"{03e45e84-1992-4d42-9116-26f756012634}\" Name=\"ContentTypeId\" /></FieldRefs><DisplayPattern><MapToContentType><Column Name=\"ContentTypeId\" /></MapToContentType></DisplayPattern></Field><Field ID=\"{fa564e0f-0c70-4ab9-b863-0177e6ddd247}\" Name=\"Title\" SourceID=\"http://schemas.microsoft.com/sharepoint/v3\" StaticName=\"Title\" Group=\"_Hidden\" Type=\"Text\" DisplayName=\"Title\" Required=\"TRUE\" FromBaseType=\"TRUE\" DelayActivateTemplateBinding=\"GROUP,SPSPERS,SITEPAGEPUBLISHING\" Customization=\"\" ShowInNewForm=\"TRUE\" ShowInEditForm=\"TRUE\"></Field></Fields><XmlDocuments><XmlDocument NamespaceURI=\"http://schemas.microsoft.com/sharepoint/v3/contenttype/forms\"><FormTemplates xmlns=\"http://schemas.microsoft.com/sharepoint/v3/contenttype/forms\"><Display>ListForm</Display><Edit>ListForm</Edit><New>ListForm</New></FormTemplates></XmlDocument></XmlDocuments></ContentType>",
"Scope": "/sites/contoso-sales",
"Sealed": false,
"StringId": "0x01007926A45D687BA842B947286090B8F67D"
}
]
CTRL + M