Skip to main content

spo list get

Gets information about the specific list

Usage

m365 spo list get [options]

Options

-u, --webUrl <webUrl>

URL of the site where the list to retrieve is located.

-i, --id [id]

ID of the list to retrieve information for. Specify either id, title, or url but not multiple.

-t, --title [title]

Title of the list to retrieve information for. Specify either id, title, or url but not multiple.

--url [url]

Server- or site-relative URL of the list. Specify either id, title, or url but not multiple.

-p, --properties [properties]

Comma-separated list of properties to retrieve from the list. Will retrieve all properties possible from default response, if not specified.

--withPermissions

Set if you want to return associated roles and permissions of the list.

-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

When the properties option includes values with a /, for example: ListItemAllFields/Id, an additional $expand query parameter will be included on ListItemAllFields.

Examples

Get information about a list with specified ID located in the specified site.

m365 spo list get --id 0cd891ef-afce-4e55-b836-fce03286cccf --webUrl https://contoso.sharepoint.com/sites/project-x

Get information about a list with specified title located in the specified site.

m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x

Get information about a list with specified server relative url located in the specified site.

m365 spo list get --url 'sites/project-x/Documents' --webUrl https://contoso.sharepoint.com/sites/project-x

Get information about a list with specified site-relative URL located in the specified site.

m365 spo list get --url 'Shared Documents' --webUrl https://contoso.sharepoint.com/sites/project-x

Get information about a list returning the specified list properties.

m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties "Title,Id,HasUniqueRoleAssignments,AllowContentTypes"

Get information about a list returning the list Id, Title and ServerRelativeUrl properties.

m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --properties "Title,Id,RootFolder/ServerRelativeUrl"

Get information about a list along with the roles and permissions.

m365 spo list get --title Documents --webUrl https://contoso.sharepoint.com/sites/project-x --withPermissions

Response

{
"VersionPolicies": {
"DefaultExpireAfterDays": 0,
"DefaultTrimMode": 0,
"DefaultTrimModeValue": "NoExpiration"
},
"AllowContentTypes": true,
"BaseTemplate": 100,
"BaseType": 0,
"ContentTypesEnabled": true,
"CrawlNonDefaultViews": false,
"Created": "2022-10-23T09:30:00Z",
"CurrentChangeToken": {
"StringValue": "1;3;97d19285-b8a6-4c7f-9c6c-d6b850a6561a;638042258222730000;564169620"
},
"DefaultContentApprovalWorkflowId": "00000000-0000-0000-0000-000000000000",
"DefaultItemOpenUseListSetting": false,
"Description": "",
"Direction": "none",
"DisableCommenting": false,
"DisableGridEditing": false,
"DocumentTemplateUrl": null,
"DraftVersionVisibility": 0,
"EnableAttachments": true,
"EnableFolderCreation": false,
"EnableMinorVersions": false,
"EnableModeration": false,
"EnableRequestSignOff": true,
"EnableVersioning": true,
"EntityTypeName": "TestList",
"ExemptFromBlockDownloadOfNonViewableFiles": false,
"FileSavePostProcessingEnabled": false,
"ForceCheckout": false,
"HasExternalDataSource": false,
"Hidden": false,
"Id": "97d19285-b8a6-4c7f-9c6c-d6b850a6561a",
"ImagePath": {
"DecodedUrl": "/_layouts/15/images/itgen.png?rev=47"
},
"ImageUrl": "/_layouts/15/images/itgen.png?rev=47",
"DefaultSensitivityLabelForLibrary": "",
"IrmEnabled": false,
"IrmExpire": false,
"IrmReject": false,
"IsApplicationList": false,
"IsCatalog": false,
"IsPrivate": false,
"ItemCount": 0,
"LastItemDeletedDate": "2022-11-16T19:55:37Z",
"LastItemModifiedDate": "2022-11-16T19:55:39Z",
"LastItemUserModifiedDate": "2022-11-16T19:55:37Z",
"ListExperienceOptions": 0,
"ListItemEntityTypeFullName": "SP.Data.TestListItem",
"MajorVersionLimit": 50,
"MajorWithMinorVersionsLimit": 0,
"MultipleDataList": false,
"NoCrawl": false,
"ParentWebPath": {
"DecodedUrl": "/"
},
"ParentWebUrl": "/",
"ParserDisabled": false,
"ServerTemplateCanCreateFolders": true,
"TemplateFeatureId": "00bfea71-de22-43b2-a848-c05709900100",
"Title": "Test"
}

More information

CTRL + M