@pnp/cli-microsoft365 11.9.0-beta.8c1ee05 → 11.9.0-beta.f8dc984
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.
- package/.devproxy/api-specs/sharepoint.yaml +166 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/cli/commands/app/app-reconsent.js +8 -0
- package/dist/m365/cli/commands/cli-consent.js +8 -31
- package/dist/m365/cli/commands/cli-doctor.js +6 -1
- package/dist/m365/cli/commands/cli-issue.js +8 -36
- package/dist/m365/cli/commands/completion/completion-clink-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +8 -16
- package/dist/m365/cli/commands/completion/completion-pwsh-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-setup.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-update.js +8 -0
- package/dist/m365/cli/commands/config/config-get.js +9 -32
- package/dist/m365/cli/commands/config/config-list.js +8 -0
- package/dist/m365/cli/commands/config/config-reset.js +9 -34
- package/dist/m365/cli/commands/config/config-set.js +86 -70
- package/dist/m365/commands/request.js +26 -60
- package/dist/m365/commands/search.js +59 -77
- package/dist/m365/commands/setup.js +16 -31
- package/dist/m365/commands/version.js +6 -0
- package/dist/m365/connection/commands/connection-remove.js +9 -29
- package/dist/m365/connection/commands/connection-use.js +8 -26
- package/dist/m365/context/commands/context-init.js +6 -0
- package/dist/m365/context/commands/option/option-set.js +9 -18
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +32 -63
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +21 -45
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +32 -53
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +34 -74
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +37 -57
- package/dist/m365/entra/commands/multitenant/multitenant-get.js +8 -1
- package/dist/m365/entra/commands/multitenant/multitenant-remove.js +8 -22
- package/dist/m365/entra/commands/multitenant/multitenant-set.js +15 -36
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +10 -31
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +8 -24
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +9 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +9 -17
- package/dist/m365/outlook/commands/calendar/calendar-get.js +1 -1
- package/dist/m365/spe/commands/container/container-get.js +54 -26
- package/dist/m365/spe/commands/container/container-permission-list.js +43 -4
- package/dist/m365/spe/commands/container/container-set.js +77 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/file/file-unarchive.js +83 -0
- package/dist/m365/spo/commands/folder/folder-archive.js +89 -0
- package/dist/m365/spo/commands/list/list-sensitivitylabel-remove.js +83 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +79 -0
- package/dist/m365/viva/commands.js +1 -0
- package/docs/docs/cmd/outlook/calendar/calendar-get.mdx +7 -7
- package/docs/docs/cmd/spe/container/container-get.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-set.mdx +160 -0
- package/docs/docs/cmd/spo/app/app-add.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-deploy.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-get.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-install.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-instance-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-remove.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-retract.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-teamspackage-download.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +21 -0
- package/docs/docs/cmd/spo/apppage/apppage-add.mdx +19 -1
- package/docs/docs/cmd/spo/apppage/apppage-set.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-remove.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +68 -0
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +73 -0
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-remove.mdx +77 -0
- package/docs/docs/cmd/viva/engage/engage-role-member-add.mdx +76 -0
- package/npm-shrinkwrap.json +273 -128
- package/package.json +18 -18
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import commands from '../../commands.js';
|
|
2
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { validation } from '../../../../utils/validation.js';
|
|
6
|
+
import { cli } from '../../../../cli/cli.js';
|
|
7
|
+
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string()
|
|
13
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
+
error: e => `'${e.input}' is not a valid SharePoint Online site URL.`
|
|
15
|
+
})
|
|
16
|
+
.alias('u'),
|
|
17
|
+
url: z.string().optional(),
|
|
18
|
+
id: z.uuid().optional().alias('i'),
|
|
19
|
+
force: z.boolean().optional().alias('f')
|
|
20
|
+
});
|
|
21
|
+
class SpoFolderArchiveCommand extends SpoCommand {
|
|
22
|
+
get name() {
|
|
23
|
+
return commands.FOLDER_ARCHIVE;
|
|
24
|
+
}
|
|
25
|
+
get description() {
|
|
26
|
+
return 'Archives a folder';
|
|
27
|
+
}
|
|
28
|
+
get schema() {
|
|
29
|
+
return options;
|
|
30
|
+
}
|
|
31
|
+
getRefinedSchema(schema) {
|
|
32
|
+
return schema
|
|
33
|
+
.refine(options => [options.url, options.id].filter(o => o !== undefined).length === 1, {
|
|
34
|
+
error: `Specify 'url' or 'id', but not both.`
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
getExcludedOptionsWithUrls() {
|
|
38
|
+
return ['url'];
|
|
39
|
+
}
|
|
40
|
+
async commandAction(logger, args) {
|
|
41
|
+
const { webUrl, url, id, force } = args.options;
|
|
42
|
+
if (!force) {
|
|
43
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you would like to archive this item? You will be able to reactivate it instantly for the first 7 days. After that, it will take up to 24 hours to reactivate.` });
|
|
44
|
+
if (!result) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
if (this.verbose) {
|
|
50
|
+
await logger.logToStderr(`Archiving folder ${url || id} at site ${webUrl}...`);
|
|
51
|
+
}
|
|
52
|
+
let requestUrl = `${webUrl}/_api/web`;
|
|
53
|
+
if (id) {
|
|
54
|
+
requestUrl += `/GetFolderById('${formatting.encodeQueryParameter(id)}')`;
|
|
55
|
+
}
|
|
56
|
+
else if (url) {
|
|
57
|
+
const serverRelativePath = urlUtil.getServerRelativePath(webUrl, url);
|
|
58
|
+
requestUrl += `/GetFolderByServerRelativePath(DecodedUrl='${formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
59
|
+
}
|
|
60
|
+
requestUrl += '?$select=Exists,ListItemAllFields/Id,ListItemAllFields/ParentList/Id&$expand=ListItemAllFields,ListItemAllFields/ParentList';
|
|
61
|
+
const folderInfo = await request.get({
|
|
62
|
+
url: requestUrl,
|
|
63
|
+
headers: {
|
|
64
|
+
accept: 'application/json;odata=nometadata'
|
|
65
|
+
},
|
|
66
|
+
responseType: 'json'
|
|
67
|
+
});
|
|
68
|
+
if (!folderInfo.Exists) {
|
|
69
|
+
throw `The folder '${url || id}' does not exist.`;
|
|
70
|
+
}
|
|
71
|
+
if (!folderInfo.ListItemAllFields?.ParentList) {
|
|
72
|
+
throw `The folder '${url || id}' is the root folder of a document library and cannot be archived. Archive a subfolder instead.`;
|
|
73
|
+
}
|
|
74
|
+
const requestOptions = {
|
|
75
|
+
url: `${webUrl}/_api/Lists(guid'${folderInfo.ListItemAllFields.ParentList.Id}')/items(${folderInfo.ListItemAllFields.Id})/Archive`,
|
|
76
|
+
headers: {
|
|
77
|
+
accept: 'application/json;odata=nometadata'
|
|
78
|
+
},
|
|
79
|
+
responseType: 'json'
|
|
80
|
+
};
|
|
81
|
+
await request.post(requestOptions);
|
|
82
|
+
}
|
|
83
|
+
catch (err) {
|
|
84
|
+
this.handleRejectedODataJsonPromise(err);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export default new SpoFolderArchiveCommand();
|
|
89
|
+
//# sourceMappingURL=folder-archive.js.map
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import request from '../../../../request.js';
|
|
4
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
5
|
+
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
6
|
+
import { validation } from '../../../../utils/validation.js';
|
|
7
|
+
import SpoCommand from '../../../base/SpoCommand.js';
|
|
8
|
+
import commands from '../../commands.js';
|
|
9
|
+
import { cli } from '../../../../cli/cli.js';
|
|
10
|
+
export const options = z.strictObject({
|
|
11
|
+
...globalOptionsZod.shape,
|
|
12
|
+
webUrl: z.string()
|
|
13
|
+
.refine(url => validation.isValidSharePointUrl(url) === true, {
|
|
14
|
+
error: 'Specify a valid SharePoint site URL.'
|
|
15
|
+
})
|
|
16
|
+
.alias('u'),
|
|
17
|
+
listTitle: z.string().optional().alias('t'),
|
|
18
|
+
listId: z.uuid().optional().alias('l'),
|
|
19
|
+
listUrl: z.string().optional(),
|
|
20
|
+
force: z.boolean().optional().alias('f')
|
|
21
|
+
});
|
|
22
|
+
class SpoListSensitivityLabelRemoveCommand extends SpoCommand {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands.LIST_SENSITIVITYLABEL_REMOVE;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Clears a default sensitivity label from a document library';
|
|
28
|
+
}
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
getRefinedSchema(schema) {
|
|
33
|
+
return schema
|
|
34
|
+
.refine(options => [options.listId, options.listTitle, options.listUrl].filter(o => o !== undefined).length === 1, {
|
|
35
|
+
error: 'Use one of the following options: listId, listTitle, or listUrl.'
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async commandAction(logger, args) {
|
|
39
|
+
const removeSensitivityLabel = async () => {
|
|
40
|
+
try {
|
|
41
|
+
if (this.verbose) {
|
|
42
|
+
await logger.logToStderr(`Removing the sensitivity label from list '${args.options.listId || args.options.listTitle || args.options.listUrl}' in site at ${args.options.webUrl}...`);
|
|
43
|
+
}
|
|
44
|
+
let requestUrl = `${args.options.webUrl}/_api/web`;
|
|
45
|
+
if (args.options.listId) {
|
|
46
|
+
requestUrl += `/lists(guid'${formatting.encodeQueryParameter(args.options.listId)}')`;
|
|
47
|
+
}
|
|
48
|
+
else if (args.options.listTitle) {
|
|
49
|
+
requestUrl += `/lists/getByTitle('${formatting.encodeQueryParameter(args.options.listTitle)}')`;
|
|
50
|
+
}
|
|
51
|
+
else if (args.options.listUrl) {
|
|
52
|
+
const listServerRelativeUrl = urlUtil.getServerRelativePath(args.options.webUrl, args.options.listUrl);
|
|
53
|
+
requestUrl += `/GetList('${formatting.encodeQueryParameter(listServerRelativeUrl)}')`;
|
|
54
|
+
}
|
|
55
|
+
const requestOptions = {
|
|
56
|
+
url: requestUrl,
|
|
57
|
+
headers: {
|
|
58
|
+
accept: 'application/json;odata=nometadata',
|
|
59
|
+
'content-type': 'application/json;odata=nometadata',
|
|
60
|
+
'if-match': '*'
|
|
61
|
+
},
|
|
62
|
+
data: { 'DefaultSensitivityLabelForLibrary': '' },
|
|
63
|
+
responseType: 'json'
|
|
64
|
+
};
|
|
65
|
+
await request.patch(requestOptions);
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
this.handleRejectedODataJsonPromise(err);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
if (args.options.force) {
|
|
72
|
+
await removeSensitivityLabel();
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const result = await cli.promptForConfirmation({ message: `Are you sure you want to remove the sensitivity label from list '${args.options.listId || args.options.listTitle || args.options.listUrl}'?` });
|
|
76
|
+
if (result) {
|
|
77
|
+
await removeSensitivityLabel();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export default new SpoListSensitivityLabelRemoveCommand();
|
|
83
|
+
//# sourceMappingURL=list-sensitivitylabel-remove.js.map
|
|
@@ -85,6 +85,7 @@ export default {
|
|
|
85
85
|
FILE_SHARINGLINK_LIST: `${prefix} file sharinglink list`,
|
|
86
86
|
FILE_SHARINGLINK_REMOVE: `${prefix} file sharinglink remove`,
|
|
87
87
|
FILE_SHARINGLINK_SET: `${prefix} file sharinglink set`,
|
|
88
|
+
FILE_UNARCHIVE: `${prefix} file unarchive`,
|
|
88
89
|
FILE_VERSION_CLEAR: `${prefix} file version clear`,
|
|
89
90
|
FILE_VERSION_GET: `${prefix} file version get`,
|
|
90
91
|
FILE_VERSION_KEEP: `${prefix} file version keep`,
|
|
@@ -92,6 +93,7 @@ export default {
|
|
|
92
93
|
FILE_VERSION_REMOVE: `${prefix} file version remove`,
|
|
93
94
|
FILE_VERSION_RESTORE: `${prefix} file version restore`,
|
|
94
95
|
FOLDER_ADD: `${prefix} folder add`,
|
|
96
|
+
FOLDER_ARCHIVE: `${prefix} folder archive`,
|
|
95
97
|
FOLDER_COPY: `${prefix} folder copy`,
|
|
96
98
|
FOLDER_GET: `${prefix} folder get`,
|
|
97
99
|
FOLDER_LIST: `${prefix} folder list`,
|
|
@@ -160,6 +162,7 @@ export default {
|
|
|
160
162
|
LIST_ROLEINHERITANCE_BREAK: `${prefix} list roleinheritance break`,
|
|
161
163
|
LIST_ROLEINHERITANCE_RESET: `${prefix} list roleinheritance reset`,
|
|
162
164
|
LIST_SENSITIVITYLABEL_ENSURE: `${prefix} list sensitivitylabel ensure`,
|
|
165
|
+
LIST_SENSITIVITYLABEL_REMOVE: `${prefix} list sensitivitylabel remove`,
|
|
163
166
|
LIST_SET: `${prefix} list set`,
|
|
164
167
|
LIST_SITESCRIPT_GET: `${prefix} list sitescript get`,
|
|
165
168
|
LIST_VIEW_ADD: `${prefix} list view add`,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
3
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
4
|
+
import commands from '../../commands.js';
|
|
5
|
+
import { vivaEngage } from '../../../../utils/vivaEngage.js';
|
|
6
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
7
|
+
import request from '../../../../request.js';
|
|
8
|
+
import { validation } from '../../../../utils/validation.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
roleId: z.uuid().optional().refine(id => validation.isValidGuid(id), {
|
|
12
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
13
|
+
}),
|
|
14
|
+
roleName: z.string().optional(),
|
|
15
|
+
userId: z.uuid().optional().refine(id => validation.isValidGuid(id), {
|
|
16
|
+
error: e => `'${e.input}' is not a valid GUID.`
|
|
17
|
+
}),
|
|
18
|
+
userName: z.string().refine(upn => validation.isValidUserPrincipalName(upn), {
|
|
19
|
+
error: e => `'${e.input}' is not a valid UPN.`
|
|
20
|
+
}).optional()
|
|
21
|
+
});
|
|
22
|
+
class VivaEngageRoleMemberAddCommand extends GraphCommand {
|
|
23
|
+
get name() {
|
|
24
|
+
return commands.ENGAGE_ROLE_MEMBER_ADD;
|
|
25
|
+
}
|
|
26
|
+
get description() {
|
|
27
|
+
return 'Assign a Viva Engage role to a user';
|
|
28
|
+
}
|
|
29
|
+
get schema() {
|
|
30
|
+
return options;
|
|
31
|
+
}
|
|
32
|
+
getRefinedSchema(schema) {
|
|
33
|
+
return schema
|
|
34
|
+
.refine(options => [options.roleId, options.roleName].filter(x => x !== undefined).length === 1, {
|
|
35
|
+
error: 'Specify either roleId, or roleName, but not both.'
|
|
36
|
+
})
|
|
37
|
+
.refine(options => [options.userId, options.userName].filter(x => x !== undefined).length === 1, {
|
|
38
|
+
error: 'Specify either userId, or userName, but not both.'
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async commandAction(logger, args) {
|
|
42
|
+
try {
|
|
43
|
+
let roleId = args.options.roleId;
|
|
44
|
+
let userId = args.options.userId;
|
|
45
|
+
if (args.options.roleName) {
|
|
46
|
+
if (this.verbose) {
|
|
47
|
+
await logger.logToStderr(`Retrieving Viva Engage role ID for role name '${args.options.roleName}'...`);
|
|
48
|
+
}
|
|
49
|
+
roleId = await vivaEngage.getRoleIdByName(args.options.roleName);
|
|
50
|
+
}
|
|
51
|
+
if (args.options.userName) {
|
|
52
|
+
if (this.verbose) {
|
|
53
|
+
await logger.logToStderr(`Retrieving Viva Engage user ID for user name '${args.options.userName}'...`);
|
|
54
|
+
}
|
|
55
|
+
userId = await entraUser.getUserIdByUpn(args.options.userName);
|
|
56
|
+
}
|
|
57
|
+
if (this.verbose) {
|
|
58
|
+
await logger.logToStderr(`Assigning user ${userId} to a Viva Engage role ${roleId}...`);
|
|
59
|
+
}
|
|
60
|
+
const requestOptions = {
|
|
61
|
+
url: `${this.resource}/beta/employeeExperience/roles/${roleId}/members`,
|
|
62
|
+
headers: {
|
|
63
|
+
'content-type': 'application/json;odata=nometadata',
|
|
64
|
+
'accept': 'application/json;odata.metadata=none'
|
|
65
|
+
},
|
|
66
|
+
responseType: 'json',
|
|
67
|
+
data: {
|
|
68
|
+
'user@odata.bind': `${this.resource}/beta/users('${userId}')`
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
await request.post(requestOptions);
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
this.handleRejectedODataJsonPromise(err);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export default new VivaEngageRoleMemberAddCommand();
|
|
79
|
+
//# sourceMappingURL=engage-role-member-add.js.map
|
|
@@ -25,6 +25,7 @@ export default {
|
|
|
25
25
|
ENGAGE_REPORT_GROUPSACTIVITYDETAIL: `${prefix} engage report groupsactivitydetail`,
|
|
26
26
|
ENGAGE_REPORT_GROUPSACTIVITYGROUPCOUNTS: `${prefix} engage report groupsactivitygroupcounts`,
|
|
27
27
|
ENGAGE_ROLE_LIST: `${prefix} engage role list`,
|
|
28
|
+
ENGAGE_ROLE_MEMBER_ADD: `${prefix} engage role member add`,
|
|
28
29
|
ENGAGE_ROLE_MEMBER_LIST: `${prefix} engage role member list`,
|
|
29
30
|
ENGAGE_ROLE_MEMBER_REMOVE: `${prefix} engage role member remove`,
|
|
30
31
|
ENGAGE_SEARCH: `${prefix} engage search`,
|
|
@@ -41,16 +41,16 @@ m365 outlook calendar get [options]
|
|
|
41
41
|
<Tabs>
|
|
42
42
|
<TabItem value="Delegated">
|
|
43
43
|
|
|
44
|
-
| Resource | Permissions
|
|
45
|
-
|
|
46
|
-
| Microsoft Graph |
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|----------------|
|
|
46
|
+
| Microsoft Graph | Calendars.Read |
|
|
47
47
|
|
|
48
48
|
</TabItem>
|
|
49
49
|
<TabItem value="Application">
|
|
50
50
|
|
|
51
|
-
| Resource | Permissions
|
|
52
|
-
|
|
53
|
-
| Microsoft Graph |
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|-----------------|----------------|
|
|
53
|
+
| Microsoft Graph | Calendars.Read |
|
|
54
54
|
|
|
55
55
|
</TabItem>
|
|
56
56
|
</Tabs>
|
|
@@ -162,4 +162,4 @@ m365 outlook calendar get --userId b743445a-112c-4fda-9afd-05943f9c7b36 --calend
|
|
|
162
162
|
```
|
|
163
163
|
|
|
164
164
|
</TabItem>
|
|
165
|
-
</Tabs>
|
|
165
|
+
</Tabs>
|
|
@@ -15,8 +15,17 @@ m365 spe container get [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-i, --id
|
|
19
|
-
: The Id of the container instance.
|
|
18
|
+
`-i, --id [id]`
|
|
19
|
+
: The Id of the container instance. Specify either `id` or `name` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --name [name]`
|
|
22
|
+
: Display name of the container. Specify either `id` or `name` but not both.
|
|
23
|
+
|
|
24
|
+
`--containerTypeId [containerTypeId]`
|
|
25
|
+
: The container type ID of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
|
|
26
|
+
|
|
27
|
+
`--containerTypeName [containerTypeName]`
|
|
28
|
+
: The container type name of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
<Global />
|
|
@@ -42,12 +51,24 @@ m365 spe container get [options]
|
|
|
42
51
|
|
|
43
52
|
## Examples
|
|
44
53
|
|
|
45
|
-
Gets a container of a specific type.
|
|
54
|
+
Gets a container of a specific type by id.
|
|
46
55
|
|
|
47
56
|
```sh
|
|
48
57
|
m365 spe container get --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
49
58
|
```
|
|
50
59
|
|
|
60
|
+
Gets a container of a specific type by display name.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spe container get --name "My Application Storage Container" --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Gets container by using its name and container type name.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 spe container get --name "Invoices" --containerTypeName "My container type name"
|
|
70
|
+
```
|
|
71
|
+
|
|
51
72
|
## Response
|
|
52
73
|
|
|
53
74
|
<Tabs>
|
|
@@ -15,8 +15,17 @@ m365 spe container permission list [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-i, --containerId
|
|
19
|
-
: The ID of the SharePoint Embedded Container.
|
|
18
|
+
`-i, --containerId [id]`
|
|
19
|
+
: The ID of the SharePoint Embedded Container. Specify either `containerId` or `containerName` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --containerName [containerName]`
|
|
22
|
+
: Display name of the SharePoint Embedded Container. Specify either `containerId` or `containerName` but not both.
|
|
23
|
+
|
|
24
|
+
`--containerTypeId [containerTypeId]`
|
|
25
|
+
: The container type ID of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `containerName` but not both.
|
|
26
|
+
|
|
27
|
+
`--containerTypeName [containerTypeName]`
|
|
28
|
+
: The container type name of the container instance. Specify either `containerTypeId` or `containerTypeName` when using `containerName` but not both.
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
<Global />
|
|
@@ -42,12 +51,24 @@ m365 spe container permission list [options]
|
|
|
42
51
|
|
|
43
52
|
## Examples
|
|
44
53
|
|
|
45
|
-
Lists Container permissions.
|
|
54
|
+
Lists Container permissions by id.
|
|
46
55
|
|
|
47
56
|
```sh
|
|
48
57
|
m365 spe container permission list --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
49
58
|
```
|
|
50
59
|
|
|
60
|
+
Lists Container permissions by display name.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 spe container permission list --containerName "My Application Storage Container" --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Lists Container permissions by display name and container type name.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 spe container permission list --containerName "My Application Storage Container" --containerTypeName "My container type name"
|
|
70
|
+
```
|
|
71
|
+
|
|
51
72
|
## Response
|
|
52
73
|
|
|
53
74
|
<Tabs>
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container set
|
|
6
|
+
|
|
7
|
+
Updates a SharePoint Embedded container
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container set [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --id <id>`
|
|
19
|
+
: The Id of the container.
|
|
20
|
+
|
|
21
|
+
`--newName [newName]`
|
|
22
|
+
: New display name for the container.
|
|
23
|
+
|
|
24
|
+
`--description [description]`
|
|
25
|
+
: Description of the container.
|
|
26
|
+
|
|
27
|
+
`--isOcrEnabled [isOcrEnabled]`
|
|
28
|
+
: Indicates whether OCR is enabled for the container. Possible values: `true`, `false`.
|
|
29
|
+
|
|
30
|
+
`--isItemVersioningEnabled [isItemVersioningEnabled]`
|
|
31
|
+
: Indicates whether item versioning is enabled. Possible values: `true`, `false`.
|
|
32
|
+
|
|
33
|
+
`--itemMajorVersionLimit [itemMajorVersionLimit]`
|
|
34
|
+
: Maximum number of major versions to keep. Requires versioning to be enabled.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|-----------------|-------------------------------|
|
|
46
|
+
| Microsoft Graph | FileStorageContainer.Selected |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|-----------------|-------------------------------|
|
|
53
|
+
| Microsoft Graph | FileStorageContainer.Selected |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
58
|
+
## Remarks
|
|
59
|
+
|
|
60
|
+
In addition to Graph permissions, the app/user must have container-type level permission for the respective container type. The caller must have write access to the container (for example, writer, manager, or owner role) to update metadata/settings.
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
|
|
64
|
+
Update the container display name by Id.
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Update description only.
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --description "Files for the Contoso Project A team"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Disable OCR for a container.
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isOcrEnabled false
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Enable versioning and set the major version limit.
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isItemVersioningEnabled true --itemMajorVersionLimit 100
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Update name, description, and settings together.
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A - Phase 2" --description "Phase 2 workspace" --isOcrEnabled true --isItemVersioningEnabled true --itemMajorVersionLimit 50
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Response
|
|
95
|
+
|
|
96
|
+
<Tabs>
|
|
97
|
+
<TabItem value="JSON">
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
|
|
102
|
+
"displayName": "Contoso Project A",
|
|
103
|
+
"description": "Files for the Contoso Project A team",
|
|
104
|
+
"containerTypeId": "91710488-5756-407f-9046-fbe5f0b4de73",
|
|
105
|
+
"status": "active",
|
|
106
|
+
"createdDateTime": "2021-11-24T15:41:52.347Z",
|
|
107
|
+
"lockState": "unlocked",
|
|
108
|
+
"settings": {
|
|
109
|
+
"isOcrEnabled": false,
|
|
110
|
+
"itemMajorVersionLimit": 50,
|
|
111
|
+
"isItemVersioningEnabled": true
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
</TabItem>
|
|
117
|
+
<TabItem value="Text">
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
containerTypeId: 91710488-5756-407f-9046-fbe5f0b4de73
|
|
121
|
+
createdDateTime: 2021-11-24T15:41:52.347Z
|
|
122
|
+
description : Files for the Contoso Project A team
|
|
123
|
+
displayName : Contoso Project A
|
|
124
|
+
id : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
125
|
+
lockState : unlocked
|
|
126
|
+
settings : {"isOcrEnabled":false,"itemMajorVersionLimit":50,"isItemVersioningEnabled":true}
|
|
127
|
+
status : active
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
</TabItem>
|
|
131
|
+
<TabItem value="CSV">
|
|
132
|
+
|
|
133
|
+
```csv
|
|
134
|
+
id,displayName,description,containerTypeId,status,createdDateTime,lockState
|
|
135
|
+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,Contoso Project A,Files for the Contoso Project A team,91710488-5756-407f-9046-fbe5f0b4de73,active,2021-11-24T15:41:52.347Z,unlocked
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
</TabItem>
|
|
139
|
+
<TabItem value="Markdown">
|
|
140
|
+
|
|
141
|
+
```md
|
|
142
|
+
# spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"
|
|
143
|
+
|
|
144
|
+
Date: 07/04/2026
|
|
145
|
+
|
|
146
|
+
## Contoso Project A (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
|
|
147
|
+
|
|
148
|
+
Property | Value
|
|
149
|
+
---------|-------
|
|
150
|
+
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
151
|
+
displayName | Contoso Project A
|
|
152
|
+
description | Files for the Contoso Project A team
|
|
153
|
+
containerTypeId | 91710488-5756-407f-9046-fbe5f0b4de73
|
|
154
|
+
status | active
|
|
155
|
+
createdDateTime | 2021-11-24T15:41:52.347Z
|
|
156
|
+
lockState | unlocked
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
</TabItem>
|
|
160
|
+
</Tabs>
|
|
@@ -40,6 +40,25 @@ When specifying site collection app catalog, you can specify the URL either with
|
|
|
40
40
|
|
|
41
41
|
If you try to upload a package that already exists in the app catalog without specifying the `--overwrite` option, the command will fail with an error stating that the specified package already exists.
|
|
42
42
|
|
|
43
|
+
## Permissions
|
|
44
|
+
|
|
45
|
+
<Tabs>
|
|
46
|
+
<TabItem value="Delegated">
|
|
47
|
+
|
|
48
|
+
| Resource | Permissions |
|
|
49
|
+
|------------|----------------------|
|
|
50
|
+
| SharePoint | AllSites.FullControl |
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
<TabItem value="Application">
|
|
54
|
+
|
|
55
|
+
| Resource | Permissions |
|
|
56
|
+
|------------|-----------------------|
|
|
57
|
+
| SharePoint | Sites.FullControl.All |
|
|
58
|
+
|
|
59
|
+
</TabItem>
|
|
60
|
+
</Tabs>
|
|
61
|
+
|
|
43
62
|
## Examples
|
|
44
63
|
|
|
45
64
|
Add the package to the tenant app catalog.
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Global from '../../_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
2
4
|
|
|
3
5
|
# spo app deploy
|
|
4
6
|
|
|
@@ -39,6 +41,25 @@ When specifying site collection app catalog, you can specify the URL either with
|
|
|
39
41
|
|
|
40
42
|
If the app with the specified ID doesn't exist in the app catalog, the command will fail with an error. Before you can deploy an app, you have to add it to the app catalog first using the [spo app add](./app-add.mdx) command.
|
|
41
43
|
|
|
44
|
+
## Permissions
|
|
45
|
+
|
|
46
|
+
<Tabs>
|
|
47
|
+
<TabItem value="Delegated">
|
|
48
|
+
|
|
49
|
+
| Resource | Permissions |
|
|
50
|
+
|------------|----------------------|
|
|
51
|
+
| SharePoint | AllSites.FullControl |
|
|
52
|
+
|
|
53
|
+
</TabItem>
|
|
54
|
+
<TabItem value="Application">
|
|
55
|
+
|
|
56
|
+
| Resource | Permissions |
|
|
57
|
+
|------------|-----------------------|
|
|
58
|
+
| SharePoint | Sites.FullControl.All |
|
|
59
|
+
|
|
60
|
+
</TabItem>
|
|
61
|
+
</Tabs>
|
|
62
|
+
|
|
42
63
|
## Examples
|
|
43
64
|
|
|
44
65
|
Deploy the specified app in the tenant app catalog. Try to resolve the URL of the tenant app catalog automatically.
|
|
@@ -36,6 +36,25 @@ When getting information about an app from the tenant app catalog, it's not nece
|
|
|
36
36
|
|
|
37
37
|
When specifying site collection app catalog, you can specify the URL either with our without the _AppCatalog_ part, for example `https://contoso.sharepoint.com/sites/team-a/AppCatalog` or `https://contoso.sharepoint.com/sites/team-a`. CLI will accept both formats.
|
|
38
38
|
|
|
39
|
+
## Permissions
|
|
40
|
+
|
|
41
|
+
<Tabs>
|
|
42
|
+
<TabItem value="Delegated">
|
|
43
|
+
|
|
44
|
+
| Resource | Permissions |
|
|
45
|
+
|------------|---------------|
|
|
46
|
+
| SharePoint | AllSites.Read |
|
|
47
|
+
|
|
48
|
+
</TabItem>
|
|
49
|
+
<TabItem value="Application">
|
|
50
|
+
|
|
51
|
+
| Resource | Permissions |
|
|
52
|
+
|------------|----------------|
|
|
53
|
+
| SharePoint | Sites.Read.All |
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
</Tabs>
|
|
57
|
+
|
|
39
58
|
## Examples
|
|
40
59
|
|
|
41
60
|
Return details about the app with the specified ID available in the tenant app catalog.
|