Skip to main content

spo field get

Retrieves information about the specified list- or site column

Usage

m365 spo field get [options]

Options

-u, --webUrl <webUrl>

Absolute URL of the site where the field is located.

-l, --listTitle [listTitle]

Title of the list where the field is located. Specify either listTitle, listId or listUrl.

--listId [listId]

ID of the list where the field is located. Specify either listTitle, listId or listUrl.

--listUrl [listUrl]

Server- or web-relative URL of the list where the field is located. Specify either listTitle, listId or listUrl.

-i, --id [id]

The ID of the field to retrieve. Specify either id, title or internalName.

-t, --title [title]

The display name (case-sensitive) of the field to retrieve. Specify either id, title or internalName.

--internalName [internalName] : The internal name (case-sensitive) of the field to retrieve. Specify either id, title or internalName.


<Global />

## Examples

Retrieves site column by id located in the specified site.

```sh
m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --id 5ee2dd25-d941-455a-9bdb-7f2c54aed11b

Retrieves list column by id located in the specified site. Retrieves the list by its title.

m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events --id 5ee2dd25-d941-455a-9bdb-7f2c54aed11b

Retrieves list column by display name located in the specified site. Retrieves the list by its url.

m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --title "Title"

Retrieves list column by internal name located in the specified site. Retrieves the list by its url.

m365 spo field get --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl "Lists/Events" --internalName "Title"

Response

{
"AutoIndexed": false,
"CanBeDeleted": true,
"ClientSideComponentId": "00000000-0000-0000-0000-000000000000",
"ClientSideComponentProperties": null,
"ClientValidationFormula": null,
"ClientValidationMessage": null,
"CustomFormatter": null,
"DefaultFormula": null,
"DefaultValue": "[today]",
"Description": "",
"Direction": "none",
"EnforceUniqueValues": false,
"EntityPropertyName": "PnPAlertStartDateTime",
"Filterable": true,
"FromBaseType": false,
"Group": "PnP Columns",
"Hidden": false,
"Id": "5ee2dd25-d941-455a-9bdb-7f2c54aed11b",
"Indexed": false,
"IndexStatus": 0,
"InternalName": "PnPAlertStartDateTime",
"IsModern": false,
"JSLink": "clienttemplates.js",
"PinnedToFiltersPane": false,
"ReadOnlyField": false,
"Required": false,
"SchemaXml": "<Field Type=\"DateTime\" DisplayName=\"Start date-time\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" Indexed=\"FALSE\" Format=\"DateTime\" Group=\"PnP Columns\" FriendlyDisplayFormat=\"Disabled\" ID=\"{5ee2dd25-d941-455a-9bdb-7f2c54aed11b}\" SourceID=\"{4f118c69-66e0-497c-96ff-d7855ce0713d}\" StaticName=\"PnPAlertStartDateTime\" Name=\"PnPAlertStartDateTime\" Version=\"1\"><Default>[today]</Default></Field>",
"Scope": "/sites/SPDemo",
"Sealed": false,
"ShowInFiltersPane": 0,
"Sortable": true,
"StaticName": "PnPAlertStartDateTime",
"Title": "Start date-time",
"FieldTypeKind": 4,
"TypeAsString": "DateTime",
"TypeDisplayName": "Date and Time",
"TypeShortDescription": "Date and Time",
"ValidationFormula": null,
"ValidationMessage": null,
"DateTimeCalendarType": 0,
"DateFormat": null,
"DisplayFormat": 1,
"FriendlyDisplayFormat": 1,
"TimeFormat": null
}
CTRL + M