Skip to content

spo folder get

Gets information about the specified folder

Usage

m365 spo folder get [options]

Options

-u, --webUrl <webUrl>
The URL of the site where the folder is located
-f, --folderUrl [folderUrl]
The server-relative URL of the folder to retrieve. Specify either folderUrl or id but not both
-i, --id [id]
The UniqueId (GUID) of the folder to retrieve. Specify either folderUrl or id but not both
-h, --help
output usage information
--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
Output type. json,text,csv. Default json
--verbose
Runs command with verbose logging
--debug
Runs command with debug logging

Remarks

If no folder exists at the specified URL, you will get a Please check the folder URL. Folder might not exist on the specified URL error.

Examples

Get folder properties for folder with server-relative url '/Shared Documents' located in site https://contoso.sharepoint.com/sites/project-x

m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/project-x --folderUrl "/Shared Documents"

Get folder properties for folder with id (UniqueId) b2307a39-e878-458b-bc90-03bc578531d6 located in site https://contoso.sharepoint.com/sites/project-x

m365 spo folder get --webUrl https://contoso.sharepoint.com/sites/project-x --id "b2307a39-e878-458b-bc90-03bc578531d6"