From e8fed45f7d8fc5556ba386c67f5520610944a6a1 Mon Sep 17 00:00:00 2001 From: Smita Nachan Date: Tue, 14 Jul 2026 03:05:54 +0000 Subject: [PATCH] Minimal permissions --- docs/docs/cmd/spo/folder/folder-add.mdx | 19 +++++++++++++++++++ docs/docs/cmd/spo/folder/folder-archive.mdx | 5 ++--- docs/docs/cmd/spo/folder/folder-copy.mdx | 19 +++++++++++++++++++ docs/docs/cmd/spo/folder/folder-get.mdx | 19 +++++++++++++++++++ docs/docs/cmd/spo/folder/folder-list.mdx | 19 +++++++++++++++++++ docs/docs/cmd/spo/folder/folder-move.mdx | 19 +++++++++++++++++++ docs/docs/cmd/spo/folder/folder-remove.mdx | 21 +++++++++++++++++++++ docs/docs/cmd/spo/folder/folder-set.mdx | 21 +++++++++++++++++++++ 8 files changed, 139 insertions(+), 3 deletions(-) diff --git a/docs/docs/cmd/spo/folder/folder-add.mdx b/docs/docs/cmd/spo/folder/folder-add.mdx index 422dae7ac8f..ff6b998d155 100644 --- a/docs/docs/cmd/spo/folder/folder-add.mdx +++ b/docs/docs/cmd/spo/folder/folder-add.mdx @@ -56,6 +56,25 @@ When you specify a value for `color`, consider the following: | Light purple | 14 | lightPurple | | Light pink | 15 | lightPink | +## Permissions + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | AllSites.Write | + + + + + | Resource | Permissions | + |------------|---------------------| + | SharePoint | Sites.ReadWrite.All | + + + + ## Examples Creates folder in a specific library within the site. diff --git a/docs/docs/cmd/spo/folder/folder-archive.mdx b/docs/docs/cmd/spo/folder/folder-archive.mdx index c0b3650a6c6..05d19c0dfcf 100644 --- a/docs/docs/cmd/spo/folder/folder-archive.mdx +++ b/docs/docs/cmd/spo/folder/folder-archive.mdx @@ -34,7 +34,6 @@ m365 spo folder archive [options] Folder archival can take some time to complete, as the status might not be reflected immediately. - ## Permissions @@ -56,13 +55,13 @@ Folder archival can take some time to complete, as the status might not be refle ## Examples -Archive a folder by id without prompting for confirmation +Archive a folder by id without prompting for confirmation. ```sh m365 spo folder archive --webUrl https://contoso.sharepoint.com/sites/Marketing --id 7a8c9207-7745-4cda-b0e2-be2618ee3030 --force ``` -Archive a folder by URL with prompting for confirmation +Archive a folder by URL with prompting for confirmation. ```sh m365 spo folder archive --webUrl https://contoso.sharepoint.com/sites/Marketing --url '/sites/Marketing/shared documents/folder' diff --git a/docs/docs/cmd/spo/folder/folder-copy.mdx b/docs/docs/cmd/spo/folder/folder-copy.mdx index af7d70e3cba..041a18f7fd8 100644 --- a/docs/docs/cmd/spo/folder/folder-copy.mdx +++ b/docs/docs/cmd/spo/folder/folder-copy.mdx @@ -46,6 +46,25 @@ When you specify a value for `nameConflictBehavior`, consider the following: - `fail` will throw an error when the destination folder already exists. - `rename` will add a suffix (e.g. Folder1) when the destination folder already exists. +## Permissions + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | AllSites.Write | + + + + + | Resource | Permissions | + |------------|---------------------| + | SharePoint | Sites.ReadWrite.All | + + + + ## Examples Copy a folder a folder to another location using server-relative URLs diff --git a/docs/docs/cmd/spo/folder/folder-get.mdx b/docs/docs/cmd/spo/folder/folder-get.mdx index 49df8cafeb7..62b6771ca2a 100644 --- a/docs/docs/cmd/spo/folder/folder-get.mdx +++ b/docs/docs/cmd/spo/folder/folder-get.mdx @@ -36,6 +36,25 @@ If no folder exists at the specified URL, you will get a `Please check the folde If root level folder is passed, you will get a `Please ensure the specified folder URL or folder Id does not refer to a root folder. Use \'spo list get\' with withPermissions instead' error.` Please use the command 'spo list get'. +## Permissions + + + + + | Resource | Permissions | + |------------|---------------| + | SharePoint | AllSites.Read | + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | Sites.Read.All | + + + + ## Examples Get folder properties for a folder with a specific site-relative URL. diff --git a/docs/docs/cmd/spo/folder/folder-list.mdx b/docs/docs/cmd/spo/folder/folder-list.mdx index 83b4e3eb38c..3a155c5316f 100644 --- a/docs/docs/cmd/spo/folder/folder-list.mdx +++ b/docs/docs/cmd/spo/folder/folder-list.mdx @@ -33,6 +33,25 @@ m365 spo folder list [options] +## Permissions + + + + + | Resource | Permissions | + |------------|---------------| + | SharePoint | AllSites.Read | + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | Sites.Read.All | + + + + ## Examples Gets list of folders under a parent folder with site-relative URL. diff --git a/docs/docs/cmd/spo/folder/folder-move.mdx b/docs/docs/cmd/spo/folder/folder-move.mdx index af4f2d0549f..089c2659049 100644 --- a/docs/docs/cmd/spo/folder/folder-move.mdx +++ b/docs/docs/cmd/spo/folder/folder-move.mdx @@ -46,6 +46,25 @@ When you specify a value for `nameConflictBehavior`, consider the following: - `fail` will throw an error when the destination folder already exists. - `rename` will add a suffix (e.g. folder1) when the destination folder already exists. +## Permissions + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | AllSites.Write | + + + + + | Resource | Permissions | + |------------|---------------------| + | SharePoint | Sites.ReadWrite.All | + + + + ## Examples Move a folder to a document library in another site collection by server-relative URL. diff --git a/docs/docs/cmd/spo/folder/folder-remove.mdx b/docs/docs/cmd/spo/folder/folder-remove.mdx index 47cc147b8bd..0b9bf39f113 100644 --- a/docs/docs/cmd/spo/folder/folder-remove.mdx +++ b/docs/docs/cmd/spo/folder/folder-remove.mdx @@ -1,4 +1,6 @@ import Global from '../../_global.mdx'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; # spo folder remove @@ -32,6 +34,25 @@ m365 spo folder remove [options] The `spo folder remove` command will remove folder only if it is empty. If the folder contains any files, deleting the folder will fail. +## Permissions + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | AllSites.Write | + + + + + | Resource | Permissions | + |------------|---------------------| + | SharePoint | Sites.ReadWrite.All | + + + + ## Examples Remove a folder with a specific site-relative URL. diff --git a/docs/docs/cmd/spo/folder/folder-set.mdx b/docs/docs/cmd/spo/folder/folder-set.mdx index 85f91d53f1a..9776f17c786 100644 --- a/docs/docs/cmd/spo/folder/folder-set.mdx +++ b/docs/docs/cmd/spo/folder/folder-set.mdx @@ -1,4 +1,6 @@ import Global from '../../_global.mdx'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; # spo folder set @@ -51,6 +53,25 @@ When you specify a value for `color`, consider the following: | Light purple | 14 | lightPurple | | Light pink | 15 | lightPink | +## Permissions + + + + + | Resource | Permissions | + |------------|----------------| + | SharePoint | AllSites.Write | + + + + + | Resource | Permissions | + |------------|---------------------| + | SharePoint | Sites.ReadWrite.All | + + + + ## Examples Set the folder name to 'My Folder 2'