Skip to content

New Command: Get the fields of a Content Type #5677

Description

@martinlingstuyl

One specific scenario that are are currently missing...

Usage

m365 spo contenttype field list

Description

Lists fields for a given site or list content type

Options

Option Description
-u, --webUrl <webUrl> URL of the SharePoint site.
-i, --contentTypeId [contentTypeId] The ID of the Content Type to list fields for. Specify either contentTypeId or contentTypeName.
-n, --contentTypeName [contentTypeName] The name of the Content Type to list fields for. Specify either contentTypeId or contentTypeName.
-t, --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 fields are located. Specify either listTitle, listId or listUrl.
--listUrl [listUrl] Optional Server- or web-relative URL of the list where the fields are located. Specify either listTitle, listId or listUrl.
-p, --properties [properties] Comma-separated list of properties to retrieve. Will retrieve all properties if not specified.

Examples

Retrieves columns for the specified site content type

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

Retrieves columns 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"

Additional Info

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions