Skip to main content

spo contenttype field list

Lists fields for a given site or list content type

Usage

m365 spo contenttype field list [options]

Options

-u, --webUrl <webUrl>

Absolute URL of the site where the content type is located.

-i, --contentTypeId [contentTypeId]

The ID of the content type for which to list fields. Specify either contentTypeId or contentTypeName.

-n, --contentTypeName [contentTypeName]

The name of the content type for which to list fields. Specify either contentTypeId or contentTypeName.

-l, --listTitle [listTitle]

Optional title of the list where the content type is located. Specify either listTitle, listId or listUrl.

--listId [listId]

Optional ID of the list where the content type is located. Specify either listTitle, listId or listUrl.

--listUrl [listUrl]

Optional server- or web-relative URL of the list where the content type is located. Specify either listTitle, listId or listUrl.

-p, --properties [properties]

Comma-separated list of properties to retrieve. Will retrieve all properties if not specified.

-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

Retrieves fields for the specified site content type.

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

Retrieves fields for the specified list content type in the Documents library.

m365 spo contenttype field list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --contentTypeName "Document" --listTitle "Documents"

Response

[
{
"AutoIndexed": false,
"CanBeDeleted": false,
"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
"ClientSideComponentProperties": null,
"ClientValidationFormula": null,
"ClientValidationMessage": null,
"CustomFormatter": null,
"DefaultFormula": null,
"DefaultValue": null,
"Description": "",
"Direction": "none",
"EnforceUniqueValues": false,
"EntityPropertyName": "Title",
"Filterable": true,
"FromBaseType": true,
"Group": "_Hidden",
"Hidden": false,
"Id": "fa564e0f-0c70-4ab9-b863-0177e6ddd247",
"Indexed": false,
"IndexStatus": 0,
"InternalName": "Title",
"IsModern": false,
"JSLink": "clienttemplates.js",
"PinnedToFiltersPane": false,
"ReadOnlyField": false,
"Required": true,
"SchemaXml": "<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>",
"Scope": "/",
"Sealed": false,
"ShowInFiltersPane": 0,
"Sortable": true,
"StaticName": "Title",
"Title": "Title",
"FieldTypeKind": 2,
"TypeAsString": "Text",
"TypeDisplayName": "Single line of text",
"TypeShortDescription": "Single line of text",
"ValidationFormula": null,
"ValidationMessage": null,
"MaxLength": 255
}
]
CTRL + M