@pnp/cli-microsoft365 6.11.0-beta.7edcad2 → 6.11.0-beta.cb74646

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/Auth.js +2 -1
  2. package/dist/Command.js +1 -1
  3. package/dist/m365/cli/commands/config/config-list.js +29 -0
  4. package/dist/m365/cli/commands.js +1 -0
  5. package/dist/m365/pa/commands/app/app-permission-ensure.js +177 -0
  6. package/dist/m365/pa/commands/app/app-permission-remove.js +170 -0
  7. package/dist/m365/pa/commands.js +2 -0
  8. package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
  9. package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
  10. package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
  11. package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
  12. package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
  13. package/dist/m365/planner/commands/plan/plan-get.js +1 -2
  14. package/dist/m365/planner/commands/plan/plan-list.js +4 -5
  15. package/dist/m365/planner/commands/plan/plan-set.js +2 -2
  16. package/dist/m365/planner/commands/task/task-add.js +17 -11
  17. package/dist/m365/planner/commands/task/task-get.js +35 -25
  18. package/dist/m365/planner/commands/task/task-list.js +26 -19
  19. package/dist/m365/planner/commands/task/task-remove.js +40 -35
  20. package/dist/m365/planner/commands/task/task-set.js +35 -23
  21. package/dist/m365/spfx/commands/project/DeployWorkflow.js +58 -0
  22. package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.18.0-beta.1.js → doctor-1.18.0-beta.5.js} +1 -1
  23. package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
  24. package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +34 -23
  25. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +171 -0
  26. package/dist/m365/spfx/commands/project/project-github-workflow-model.js +3 -0
  27. package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.15.2.js +1 -1
  28. package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.18.0-beta.1.js → upgrade-1.18.0-beta.5.js} +26 -26
  29. package/dist/m365/spfx/commands/project/project-upgrade.js +1 -1
  30. package/dist/m365/spfx/commands/spfx-doctor.js +35 -51
  31. package/dist/m365/spfx/commands.js +1 -0
  32. package/dist/m365/spo/commands/app/SpoAppBaseCommand.js +26 -14
  33. package/dist/m365/spo/commands/app/app-add.js +9 -9
  34. package/dist/m365/spo/commands/file/file-add.js +13 -13
  35. package/dist/m365/spo/commands/file/file-checkin.js +1 -1
  36. package/dist/m365/spo/commands/file/file-checkout.js +1 -1
  37. package/dist/m365/spo/commands/file/file-copy.js +38 -4
  38. package/dist/m365/spo/commands/file/file-list.js +4 -4
  39. package/dist/m365/spo/commands/file/file-move.js +2 -2
  40. package/dist/m365/spo/commands/file/file-remove.js +6 -6
  41. package/dist/m365/spo/commands/file/file-rename.js +2 -2
  42. package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
  43. package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
  44. package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
  45. package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
  46. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
  47. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
  48. package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
  49. package/dist/m365/spo/commands/file/file-version-get.js +1 -1
  50. package/dist/m365/spo/commands/file/file-version-list.js +1 -1
  51. package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
  52. package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
  53. package/dist/m365/spo/commands/folder/folder-add.js +2 -4
  54. package/dist/m365/spo/commands/folder/folder-get.js +1 -1
  55. package/dist/m365/spo/commands/folder/folder-list.js +2 -2
  56. package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
  57. package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
  58. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
  59. package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
  60. package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
  61. package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
  62. package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
  63. package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
  64. package/dist/m365/spo/commands/group/group-list.js +0 -1
  65. package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
  66. package/dist/m365/spo/commands/orgassetslibrary/orgassetslibrary-add.js +32 -3
  67. package/dist/m365/spo/commands/page/Page.js +24 -32
  68. package/dist/m365/spo/commands/propertybag/propertybag-base.js +75 -54
  69. package/dist/m365/spo/commands/propertybag/propertybag-remove.js +41 -40
  70. package/dist/m365/spo/commands/serviceprincipal/serviceprincipal-set.js +32 -32
  71. package/dist/m365/spo/commands/site/FlowsPolicy.js +10 -0
  72. package/dist/m365/spo/commands/site/site-add.js +113 -154
  73. package/dist/m365/spo/commands/site/site-apppermission-add.js +26 -27
  74. package/dist/m365/spo/commands/site/site-apppermission-remove.js +37 -37
  75. package/dist/m365/spo/commands/site/site-apppermission-set.js +15 -16
  76. package/dist/m365/spo/commands/site/site-ensure.js +19 -70
  77. package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +24 -22
  78. package/dist/m365/spo/commands/site/site-list.js +28 -36
  79. package/dist/m365/spo/commands/site/site-remove.js +139 -171
  80. package/dist/m365/spo/commands/site/site-set.js +179 -178
  81. package/dist/m365/spo/commands/theme/theme-remove.js +26 -24
  82. package/dist/m365/spo/commands/theme/theme-set.js +0 -1
  83. package/dist/m365/spo/commands/user/user-remove.js +29 -27
  84. package/dist/m365/spo/commands/web/web-reindex.js +17 -20
  85. package/dist/m365/spo/commands/web/web-remove.js +23 -21
  86. package/dist/m365/spo/commands/web/web-roleassignment-add.js +45 -52
  87. package/dist/m365/spo/commands/web/web-roleassignment-remove.js +58 -61
  88. package/dist/m365/spo/commands/web/web-roleinheritance-break.js +20 -18
  89. package/dist/m365/spo/commands/web/web-roleinheritance-reset.js +21 -19
  90. package/dist/m365/yammer/commands/message/message-like-set.js +29 -28
  91. package/dist/m365/yammer/commands/message/message-list.js +9 -26
  92. package/dist/m365/yammer/commands/message/message-remove.js +20 -18
  93. package/dist/m365/yammer/commands/yammer-search.js +42 -56
  94. package/dist/utils/aadGroup.js +20 -0
  95. package/dist/utils/fsUtil.js +5 -0
  96. package/dist/utils/planner.js +6 -3
  97. package/dist/utils/spo.js +601 -1
  98. package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
  99. package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
  100. package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
  101. package/docs/docs/cmd/login.mdx +6 -0
  102. package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
  103. package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
  104. package/docs/docs/cmd/planner/task/task-add.mdx +22 -7
  105. package/docs/docs/cmd/planner/task/task-get.mdx +13 -4
  106. package/docs/docs/cmd/planner/task/task-list.mdx +22 -7
  107. package/docs/docs/cmd/planner/task/task-remove.mdx +25 -8
  108. package/docs/docs/cmd/planner/task/task-set.mdx +22 -7
  109. package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
  110. package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
  111. package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
  112. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +94 -0
  113. package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
  114. package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
  115. package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
  116. package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
  117. package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
  118. package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
  119. package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
  120. package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
  121. package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
  122. package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
  123. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +2 -2
  124. package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
  125. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
  126. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
  127. package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
  128. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
  129. package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
  130. package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
  131. package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
  132. package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
  133. package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
  134. package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
  135. package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
  136. package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
  137. package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
  138. package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
  139. package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
  140. package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
  141. package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
  142. package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
  143. package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
  144. package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
  145. package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
  146. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
  147. package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
  148. package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
  149. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
  150. package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
  151. package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
  152. package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
  153. package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.mdx +14 -1
  154. package/docs/docs/cmd/spo/site/site-ensure.mdx +1 -1
  155. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
  156. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
  157. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
  158. package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
  159. package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
  160. package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
  161. package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
  162. package/npm-shrinkwrap.json +698 -345
  163. package/package.json +15 -14
@@ -0,0 +1,94 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # spfx project github workflow add
4
+
5
+ Adds a GitHub workflow for a SharePoint Framework project
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 spfx project github workflow add [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-n, --name [name]`
17
+ : Name of the workflow that will be created. If none is specified a default name will be used 'Deploy Solution ${name of sppkg file}'
18
+
19
+ `-b, --branchName [branchName]`
20
+ : Specify the branch name which should trigger the workflow on push. If none is specified a default will be used which is 'main'
21
+
22
+ `-m, --manuallyTrigger`
23
+ : When specified a manual trigger option will be added to the workflow: `workflow_dispatch`
24
+
25
+ `-l, --loginMethod [loginMethod]`
26
+ : Specify the login method used for the login action. Possible options are: `user`, `application`. Default `application`'
27
+
28
+ `-s, --scope [scope]`
29
+ : Scope of the app catalog: `tenant`, `sitecollection`. Default is `tenant`
30
+
31
+ `-u, --siteUrl [siteUrl]`
32
+ : The URL of the site collection where the solution package will be added. Required if scope is set to `sitecollection`
33
+
34
+ `--skipFeatureDeployment`
35
+ : When specified and the app supports tenant-wide deployment, deploy it to the whole tenant
36
+
37
+ `--overwrite`
38
+ : When specified the workflow will overwrite the existing .sppkg if it is already deployed in the app catalog.
39
+ ```
40
+
41
+ <Global />
42
+
43
+ ## Remarks
44
+
45
+ The `spfx project github workflow add` will create a workflow .yml file in the `.github/workflows` directory in your project. If such directory does not exist the command will automatically create it.
46
+
47
+ For the `application` login method the command does not register AAD application nor create the required certificate. In order for you to proceed you will need to first obtain (create) a self-signed certificate and register a new AAD application with certificate authentication. After that in GitHub repo settings, you will need to create the following secrets:
48
+
49
+ - `APP_ID` - client id of the registered AAD application
50
+ - `CERTIFICATE_ENCODED` - application's encoded certificate
51
+ - `CERTIFICATE_PASSWORD` - certificate password. This applies only if the certificate is encoded which is the recommended approach
52
+
53
+ This use case is perfect in a production context as it does not create any dependencies on an account
54
+
55
+ For the `user` login method you will need to create the following secrets in GitHub repo settings:
56
+
57
+ - `ADMIN_USERNAME` - username
58
+ - `ADMIN_PASSWORD` - password
59
+
60
+ This method is perfect to test your workflow, in a dev context, for personal usage. It will not work for accounts with MFA.
61
+
62
+ :::info
63
+
64
+ Run this command in the SPFx solution folder.
65
+
66
+ :::
67
+
68
+ ## Examples
69
+
70
+ Adds a GitHub workflow for a SharePoint Framework project with `application` login method triggered on push to main
71
+
72
+ ```sh
73
+ m365 spfx project github workflow add
74
+ ```
75
+
76
+ Adds a GitHub workflow for a SharePoint Framework project with `user` login method triggered on push to main and when manually triggered.
77
+
78
+ ```sh
79
+ m365 spfx project github workflow add --manuallyTrigger --loginMethod "user"
80
+ ```
81
+
82
+ Adds a GitHub workflow for a SharePoint Framework project with deployment to a site collection app catalog
83
+
84
+ ```sh
85
+ m365 spfx project github workflow add --scope "sitecollection" --siteUrl "https://some.sharepoint.com/sites/someSite"
86
+ ```
87
+
88
+ ## Response
89
+
90
+ The command won't return a response on success.
91
+
92
+ ## More information
93
+
94
+ - Automate your CI/CD workflow using CLI for Microsoft 365 GitHub Actions: [https://pnp.github.io/cli-microsoft365/user-guide/github-actions](https://pnp.github.io/cli-microsoft365/user-guide/github-actions)
@@ -17,7 +17,7 @@ m365 spo file add [options]
17
17
  : The URL of the site where the file should be uploaded to
18
18
 
19
19
  `-f, --folder <folder>`
20
- : The server- or site-relative URL to the folder where the file should be uploaded
20
+ : The server- or site-relative decoded URL to the folder where the file should be uploaded
21
21
 
22
22
  `-p, --path <path>`
23
23
  : Local path to the file to upload
@@ -17,7 +17,7 @@ m365 spo file checkin [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-f, --url [url]`
20
- : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
20
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `url` or `id` but not both
21
21
 
22
22
  `-i, --id [id]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -17,7 +17,7 @@ m365 spo file checkout undo [options]
17
17
  : The URL of the site where the file is located.
18
18
 
19
19
  `-f, --fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
@@ -28,14 +28,6 @@ m365 spo file checkout undo [options]
28
28
 
29
29
  <Global />
30
30
 
31
- ## Remarks
32
-
33
- :::info
34
-
35
- When specifying option `fileUrl`, make sure that the URL is decoded. If not, you will get a `File Not Found` error.
36
-
37
- :::
38
-
39
31
  ## Examples
40
32
 
41
33
  Discards a checked-out file with a specific ID.
@@ -17,7 +17,7 @@ m365 spo file checkout [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-f, --url [url]`
20
- : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
20
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `url` or `id` but not both
21
21
 
22
22
  `-i, --id [id]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -16,11 +16,14 @@ m365 spo file copy [options]
16
16
  `-u, --webUrl <webUrl>`
17
17
  : The URL of the site where the file is located.
18
18
 
19
- `-s, --sourceUrl <sourceUrl>`
20
- : Site-relative, server-relative or absolute URL of the file.
19
+ `-s, --sourceUrl [sourceUrl]`
20
+ : Site-relative, server-relative or absolute decoded URL of the file. Specify either `sourceUrl` or `sourceId` but not both.
21
+
22
+ `-i, --sourceId [sourceId]`
23
+ : The Unique ID (GUID) of the file. Specify either `sourceUrl` or `sourceId` but not both.
21
24
 
22
25
  `-t, --targetUrl <targetUrl>`
23
- : Server-relative or absolute URL of the location.
26
+ : Server-relative or absolute decoded URL of the location.
24
27
 
25
28
  `--newName [newName]`
26
29
  : New name of the destination file.
@@ -28,6 +31,9 @@ m365 spo file copy [options]
28
31
  `--nameConflictBehavior [nameConflictBehavior]`
29
32
  : Behavior when a document with the same name is already present at the destination. Possible values: `fail`, `replace`, `rename`. Default is `fail`.
30
33
 
34
+ `--resetAuthorAndCreated`
35
+ : Use this option to clear the author and created date. When not specified, the values from the source file are used.
36
+
31
37
  `--bypassSharedLock`
32
38
  : This indicates whether a file with a share lock can still be copied. Use this option to copy a file that is locked.
33
39
  ```
@@ -36,12 +42,6 @@ m365 spo file copy [options]
36
42
 
37
43
  ## Remarks
38
44
 
39
- :::info
40
-
41
- The required URLs `webUrl`, `sourceUrl` and `targetUrl` cannot be encoded. When you do so, you will get a `File Not Found` error.
42
-
43
- :::
44
-
45
45
  When you specify a value for `nameConflictBehavior`, consider the following:
46
46
 
47
47
  - `fail` will throw an error when the destination file already exists.
@@ -50,30 +50,34 @@ When you specify a value for `nameConflictBehavior`, consider the following:
50
50
 
51
51
  ## Examples
52
52
 
53
- Copy a file to a document library in another site collection with server relative URLs
53
+ Copy a file by server-relative URL to a document library in another site collection with server relative URL
54
54
 
55
55
  ```sh
56
56
  m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceUrl "/sites/project/Shared Documents/Document.pdf" --targetUrl "/sites/IT/Shared Documents"
57
57
  ```
58
58
 
59
- Copy a file to a document library in another site collection with absolute URLs
59
+ Copy a file by site-relative URL to a document library in another site collection and clear the author and created date
60
60
 
61
61
  ```sh
62
- m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceUrl "https://contoso.sharepoint.com/sites/project/Shared Documents/Document.pdf" --targetUrl "https://contoso.sharepoint.com/sites/IT/Shared Documents"
62
+ m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceUrl "/Shared Documents/Document.pdf" --targetUrl "/sites/IT/Shared Documents" --resetAuthorAndCreated
63
63
  ```
64
64
 
65
- Copy file to a document library in another site collection with a new name
65
+ Copy file by sourceId (UniqueId) to a document library in another site collection and rename the file
66
66
 
67
67
  ```sh
68
- m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceUrl "/sites/project/Shared Documents/Document.pdf" --targetUrl "/sites/IT/Shared Documents" --newName "Report.pdf"
68
+ m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceId "b2307a39-e878-458b-bc90-03bc578531d6" --targetUrl "/sites/IT/Shared Documents" --newName "Report.pdf"
69
69
  ```
70
70
 
71
- Copy file to a document library in another site collection with a new name, rename the file if it already exists
71
+ Copy file by sourceId (UniqueId) to a document library in another site collection with a new name, rename the file if it already exists
72
72
 
73
73
  ```sh
74
- m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceUrl "/sites/project/Shared Documents/Document.pdf" --targetUrl "/sites/IT/Shared Documents" --newName "Report.pdf" --nameConflictBehavior rename
74
+ m365 spo file copy --webUrl https://contoso.sharepoint.com/sites/project --sourceId "b2307a39-e878-458b-bc90-03bc578531d6" --targetUrl "/sites/IT/Shared Documents" --newName "Report.pdf" --nameConflictBehavior rename
75
75
  ```
76
76
 
77
+ ## Response
78
+
79
+ The command won't return a response on success.
80
+
77
81
  ## More information
78
82
 
79
83
  - Copy items from a SharePoint document library: [https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc](https://support.office.com/en-us/article/move-or-copy-items-from-a-sharepoint-document-library-00e2f483-4df3-46be-a861-1f5f0c1a87bc)
@@ -19,7 +19,7 @@ m365 spo file get [options]
19
19
  : The URL of the site where the file is located
20
20
 
21
21
  `-u, --url [url]`
22
- : The server- or site-relative URL of the file to retrieve. Specify either `url` or `id` but not both
22
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `url` or `id` but not both
23
23
 
24
24
  `-i, --id [id]`
25
25
  : The UniqueId (GUID) of the file to retrieve. Specify either `url` or `id` but not both
@@ -19,10 +19,10 @@ m365 spo file list [options]
19
19
  : The URL of the site where the folder from which to retrieve files is located
20
20
 
21
21
  `-f, --folderUrl <folderUrl>`
22
- : The server- or site-relative URL of the parent folder from which to retrieve files
22
+ : The server- or site-relative decoded URL of the parent folder from which to retrieve files
23
23
 
24
24
  `-f, --folder <folder>`
25
- : (deprecated. Use `folderUrl` instead) The server- or site-relative URL of the folder from which to retrieve files
25
+ : (deprecated. Use `folderUrl` instead) The server- or site-relative decoded URL of the folder from which to retrieve files
26
26
 
27
27
  `--fields [fields]`
28
28
  : Comma-separated list of fields to retrieve. Will retrieve all fields if not specified.
@@ -17,10 +17,10 @@ m365 spo file move [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-s, --sourceUrl <sourceUrl>`
20
- : The server- or site-relative URL of the file to move
20
+ : The server- or site-relative decoded URL of the file to move
21
21
 
22
22
  `-t, --targetUrl <targetUrl>`
23
- : Server-relative URL where to move the file
23
+ : Server-relative decoded URL where to move the file
24
24
 
25
25
  `--deleteIfAlreadyExists`
26
26
  : If a file already exists at the targetUrl, it will be moved to the recycle bin. If omitted, the move operation will be canceled if the file already exists at the targetUrl location
@@ -26,7 +26,7 @@ m365 spo page template remove
26
26
  : The ID of the file to remove. Specify either `id` or `url` but not both
27
27
 
28
28
  `-u, --url [url]`
29
- : The server- or site-relative URL of the file to remove. Specify either `id` or `url` but not both
29
+ : The server- or site-relative decoded URL of the file to remove. Specify either `id` or `url` but not both
30
30
 
31
31
  `--recycle`
32
32
  : Recycle the file instead of actually deleting it
@@ -39,26 +39,26 @@ m365 spo page template remove
39
39
 
40
40
  ## Examples
41
41
 
42
- Remove the file with ID _0cd891ef-afce-4e55-b836-fce03286cccf_ located in site _https://contoso.sharepoint.com/sites/project-x_
42
+ Remove file by ID
43
43
 
44
44
  ```sh
45
45
  m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --id 0cd891ef-afce-4e55-b836-fce03286cccf
46
46
  ```
47
47
 
48
- Remove the file with site-relative URL _SharedDocuments/Test.docx_ from located in site _https://contoso.sharepoint.com/sites/project-x_
48
+ Remove the file by site-relative URL
49
49
 
50
50
  ```sh
51
- m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url SharedDocuments/Test.docx
51
+ m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/Shared Documents/Test.docx"
52
52
  ```
53
53
 
54
- Move the file with server-relative URL _/sites/project-x/SharedDocuments/Test.docx_ located in site _https://contoso.sharepoint.com/sites/project-x_ to the recycle bin
54
+ Move the file by server-relative URL to the recycle bin
55
55
 
56
56
  ```sh
57
- m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url /sites/project-x/SharedDocuments/Test.docx --recycle
57
+ m365 spo file remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/sites/project-x/SharedDocuments/Test.docx" --recycle
58
58
  ```
59
59
 
60
- Remove the page template with site-relative URL _SharedDocuments/Test.docx_ from located in site _https://contoso.sharepoint.com/sites/project-x_
60
+ Remove a page template by site-relative URL
61
61
 
62
62
  ```sh
63
- m365 spo page template remove --webUrl https://contoso.sharepoint.com/sites/project-x --url SharedDocuments/Forms/Template.dotx
63
+ m365 spo page template remove --webUrl https://contoso.sharepoint.com/sites/project-x --url "/Shared Documents/Forms/Template.dotx"
64
64
  ```
@@ -17,7 +17,7 @@ m365 spo file rename [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-s, --sourceUrl <sourceUrl>`
20
- : The server- or site-relative URL of the file to rename
20
+ : The server- or site-relative decoded URL of the file to rename
21
21
 
22
22
  `-t, --targetFileName <targetFileName>`
23
23
  : New file name of the file
@@ -34,13 +34,13 @@ If you try to rename a file without the `--force` flag and a file with this name
34
34
 
35
35
  ## Examples
36
36
 
37
- Renames a file with server-relative URL _/Shared Documents/Test1.docx_ located in site _<https://contoso.sharepoint.com/sites/project-x>_ to _Test2.docx_
37
+ Renames a file
38
38
 
39
39
  ```sh
40
40
  m365 spo file rename --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl '/Shared Documents/Test1.docx' --targetFileName 'Test2.docx'
41
41
  ```
42
42
 
43
- Renames a file with server-relative URL _/Shared Documents/Test1.docx_ located in site _<https://contoso.sharepoint.com/sites/project-x>_ to _Test2.docx_. If the file with the target file name already exists, this file will be moved to the recycle bin
43
+ Renames a file. If the file with the target file name already exists, this file will be moved to the recycle bin.
44
44
 
45
45
  ```sh
46
46
  m365 spo file rename --webUrl https://contoso.sharepoint.com/sites/project-x --sourceUrl '/Shared Documents/Test1.docx' --targetFileName 'Test2.docx' --force
@@ -14,10 +14,10 @@ m365 spo file retentionlabel ensure [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-u, --webUrl <webUrl>`
17
- : URL of the site where the retention label from a file to apply is located
17
+ : URL of the site where the retention label from a file to apply is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The site- or server-relative URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
20
+ : The site- or server-relative decoded URL of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file that should be labelled. Specify either `fileUrl` or `fileId` but not both.
@@ -14,16 +14,16 @@ m365 spo file retentionlabel remove [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-u, --webUrl <webUrl>`
17
- : URL of the site where the retention label from a file to remove is located
17
+ : URL of the site where the retention label from a file to remove is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file of which the label should be removed. Specify either `fileUrl` or `fileId` but not both.
24
24
 
25
25
  `--confirm`
26
- : Don't prompt for confirming removing the retention label from a file
26
+ : Don't prompt for confirming removing the retention label from a file.
27
27
  ```
28
28
 
29
29
  <Global />
@@ -17,7 +17,7 @@ m365 spo file roleassignment add [options]
17
17
  : URL of the site where the file is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both.
@@ -17,7 +17,7 @@ m365 spo file roleassignment remove [options]
17
17
  : URL of the site where the file is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -17,7 +17,7 @@ m365 spo file roleinheritance break [options]
17
17
  : URL of the site where the file is located
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -17,7 +17,7 @@ m365 spo file roleinheritance reset [options]
17
17
  : URL of the site where the file is located
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -17,7 +17,7 @@ m365 spo file sharinginfo get [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-f, --fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative decoded URL of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file for which to build the report. Specify either `fileUrl` or `fileId` but not both
@@ -19,7 +19,7 @@ m365 spo file sharinglink add [options]
19
19
  : The URL of the site where the file is located.
20
20
 
21
21
  `--fileUrl [fileUrl]`
22
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
22
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
23
23
 
24
24
  `--fileId [fileId]`
25
25
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -17,7 +17,7 @@ m365 spo file sharinglink clear [options]
17
17
  : The URL of the site where the file is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `--fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -19,7 +19,7 @@ m365 spo file sharinglink get [options]
19
19
  : The URL of the site where the file is located.
20
20
 
21
21
  `--fileUrl [fileUrl]`
22
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
22
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
23
23
 
24
24
  `--fileId [fileId]`
25
25
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -19,7 +19,7 @@ m365 spo file sharinglink list [options]
19
19
  : The URL of the site where the file is located.
20
20
 
21
21
  `--fileUrl [fileUrl]`
22
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
22
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
23
23
 
24
24
  `--fileId [fileId]`
25
25
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -17,7 +17,7 @@ m365 spo file sharinglink remove [options]
17
17
  : The URL of the site where the file is located.
18
18
 
19
19
  `--fileUrl [fileUrl]`
20
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
20
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
21
21
 
22
22
  `--fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -19,7 +19,7 @@ m365 spo file sharinglink set [options]
19
19
  : The URL of the site where the file is located.
20
20
 
21
21
  `--fileUrl [fileUrl]`
22
- : The server- or site-relative (decoded) URL of the file. Specify either `fileUrl` or `fileId` but not both.
22
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both.
23
23
 
24
24
  `--fileId [fileId]`
25
25
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both.
@@ -17,7 +17,7 @@ m365 spo file version clear [options]
17
17
  : The URL of the site where the file is located
18
18
 
19
19
  `-u, --fileUrl [fileUrl]`
20
- : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
20
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both
21
21
 
22
22
  `-i, --fileId [fileId]`
23
23
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -22,7 +22,7 @@ m365 spo file version get [options]
22
22
  : Label of version which will be retrieved
23
23
 
24
24
  `-u, --fileUrl [fileUrl]`
25
- : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
25
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
26
26
 
27
27
  `-i, --fileId [fileId]`
28
28
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -19,7 +19,7 @@ m365 spo file version list [options]
19
19
  : The URL of the site where the file is located
20
20
 
21
21
  `-u, --fileUrl [fileUrl]`
22
- : The server- or site-relative URL of the file. Specify either `fileUrl` or `fileId` but not both
22
+ : The server- or site-relative decoded URL of the file. Specify either `fileUrl` or `fileId` but not both
23
23
 
24
24
  `-i, --fileId [fileId]`
25
25
  : The UniqueId (GUID) of the file. Specify either `fileUrl` or `fileId` but not both
@@ -20,7 +20,7 @@ m365 spo file version remove [options]
20
20
  : Label of version which will be removed
21
21
 
22
22
  `-u, --fileUrl [fileUrl]`
23
- : The server- or site-relative URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
23
+ : The server- or site-relative decoded URL of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
24
24
 
25
25
  `-i, --fileId [fileId]`
26
26
  : The UniqueId (GUID) of the file to retrieve. Specify either `fileUrl` or `fileId` but not both
@@ -20,7 +20,7 @@ m365 spo file version restore [options]
20
20
  : Label of version which will be restored
21
21
 
22
22
  `-u, --fileUrl [fileUrl]`
23
- : The server- or site-relative URL of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
23
+ : The server- or site-relative decoded URL of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
24
24
 
25
25
  `-i, --fileId [fileId]`
26
26
  : The UniqueId (GUID) of the file whose version will be restored. Specify either `fileUrl` or `fileId` but not both
@@ -1,4 +1,6 @@
1
1
  import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
2
4
 
3
5
  # spo folder add
4
6
 
@@ -17,7 +19,7 @@ m365 spo folder add [options]
17
19
  : The URL of the site where the folder will be created.
18
20
 
19
21
  `-p, --parentFolderUrl <parentFolderUrl>`
20
- : The server- or site-relative URL of the parent folder.
22
+ : The server- or site-relative decoded URL of the parent folder.
21
23
 
22
24
  `-n, --name <name>`
23
25
  : Name of the new folder to be created
@@ -38,3 +40,76 @@ Creates folder in a specific folder within the site
38
40
  ```sh
39
41
  m365 spo folder add --webUrl https://contoso.sharepoint.com/sites/project-x --parentFolderUrl '/sites/project-x/Shared Documents/Reports' --name 'Financial reports'
40
42
  ```
43
+
44
+ ## Response
45
+
46
+ <Tabs>
47
+ <TabItem value="JSON">
48
+
49
+ ```json
50
+ {
51
+ "Exists": true,
52
+ "ExistsAllowThrowForPolicyFailures": true,
53
+ "IsWOPIEnabled": false,
54
+ "ItemCount": 0,
55
+ "Name": "My new folder",
56
+ "ProgID": null,
57
+ "ServerRelativeUrl": "/sites/project-x/Shared Documents/My new folder",
58
+ "TimeCreated": "2023-07-20T19:29:16Z",
59
+ "TimeLastModified": "2023-07-20T19:29:16Z",
60
+ "UniqueId": "94a9aa56-f0b5-4268-941f-737c841ba7c7",
61
+ "WelcomePage": ""
62
+ }
63
+ ```
64
+
65
+ </TabItem>
66
+ <TabItem value="Text">
67
+
68
+ ```text
69
+ Exists : true
70
+ ExistsAllowThrowForPolicyFailures: true
71
+ IsWOPIEnabled : false
72
+ ItemCount : 0
73
+ Name : My new folder
74
+ ProgID : null
75
+ ServerRelativeUrl : /sites/project-x/Shared Documents/My new folder
76
+ TimeCreated : 2023-07-20T19:29:16Z
77
+ TimeLastModified : 2023-07-20T19:29:16Z
78
+ UniqueId : 94a9aa56-f0b5-4268-941f-737c841ba7c7
79
+ WelcomePage :
80
+ ```
81
+
82
+ </TabItem>
83
+ <TabItem value="CSV">
84
+
85
+ ```csv
86
+ Exists,ExistsAllowThrowForPolicyFailures,IsWOPIEnabled,ItemCount,Name,ServerRelativeUrl,TimeCreated,TimeLastModified,UniqueId,WelcomePage
87
+ 1,1,,0,My new folder,/sites/project-x/Shared Documents/My new folder,2023-07-20T19:29:16Z,2023-07-20T19:29:16Z,94a9aa56-f0b5-4268-941f-737c841ba7c7,
88
+ ```
89
+
90
+ </TabItem>
91
+ <TabItem value="Markdown">
92
+
93
+ ```md
94
+ # spo folder add --webUrl "https://contoso.sharepoint.com/sites/project-x" --parentFolderUrl "/sites/project-x/Shared Documents" --name "My new folder"
95
+
96
+ Date: 20/7/2023
97
+
98
+ ## My new folder (94a9aa56-f0b5-4268-941f-737c841ba7c7)
99
+
100
+ Property | Value
101
+ ---------|-------
102
+ Exists | true
103
+ ExistsAllowThrowForPolicyFailures | true
104
+ IsWOPIEnabled | false
105
+ ItemCount | 0
106
+ Name | My new folder
107
+ ServerRelativeUrl | /sites/project-x/Shared Documents/My new folder
108
+ TimeCreated | 2023-07-20T19:29:16Z
109
+ TimeLastModified | 2023-07-20T19:29:16Z
110
+ UniqueId | 94a9aa56-f0b5-4268-941f-737c841ba7c7
111
+ WelcomePage |
112
+ ```
113
+
114
+ </TabItem>
115
+ </Tabs>
@@ -17,7 +17,7 @@ m365 spo folder get [options]
17
17
  : The URL of the site where the folder is located.
18
18
 
19
19
  `-f, --url [url]`
20
- : The server- or site-relative URL of the folder to retrieve. Specify either `folderUrl` or `id` but not both.
20
+ : The server- or site-relative decoded URL of the folder to retrieve. Specify either `folderUrl` or `id` but not both.
21
21
 
22
22
  `-i, --id [id]`
23
23
  : The UniqueId (GUID) of the folder to retrieve. Specify either `url` or `id` but not both.