Skip to main content

spo folder add

Creates a folder within a parent folder


m365 spo folder add [options]


-u, --webUrl <webUrl>

The URL of the site where the folder will be created.

-p, --parentFolderUrl <parentFolderUrl>

The server- or site-relative decoded URL of the parent folder.

-n, --name <name>

Name of the new folder to be created

-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 for more information and examples.

-o, --output [output]

Output type. json, text, csv, md, none. Default json.


Runs command with verbose logging.


Runs command with debug logging.


Creates folder in a specific library within the site

m365 spo folder add --webUrl --parentFolderUrl '/Shared Documents' --name 'My Folder Name'

Creates folder in a specific folder within the site

m365 spo folder add --webUrl --parentFolderUrl '/sites/project-x/Shared Documents/Reports' --name 'Financial reports'


"Exists": true,
"ExistsAllowThrowForPolicyFailures": true,
"IsWOPIEnabled": false,
"ItemCount": 0,
"Name": "My new folder",
"ProgID": null,
"ServerRelativeUrl": "/sites/project-x/Shared Documents/My new folder",
"TimeCreated": "2023-07-20T19:29:16Z",
"TimeLastModified": "2023-07-20T19:29:16Z",
"UniqueId": "94a9aa56-f0b5-4268-941f-737c841ba7c7",
"WelcomePage": ""