@pnp/cli-microsoft365 6.10.0-beta.f43fa4d → 6.11.0-beta.613eb82
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/dist/Auth.js +2 -1
- package/dist/Command.js +1 -1
- package/dist/m365/cli/commands/config/config-list.js +29 -0
- package/dist/m365/cli/commands.js +1 -0
- package/dist/m365/pa/commands/app/app-permission-ensure.js +177 -0
- package/dist/m365/pa/commands/app/app-permission-remove.js +170 -0
- package/dist/m365/pa/commands.js +2 -0
- package/dist/m365/planner/commands/bucket/bucket-add.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-get.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-list.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-remove.js +2 -2
- package/dist/m365/planner/commands/bucket/bucket-set.js +2 -2
- package/dist/m365/planner/commands/plan/plan-get.js +1 -2
- package/dist/m365/planner/commands/plan/plan-list.js +4 -5
- package/dist/m365/planner/commands/plan/plan-set.js +2 -2
- package/dist/m365/planner/commands/roster/roster-member-add.js +3 -14
- package/dist/m365/spfx/commands/project/project-externalize/rules/PnPJsRule.js +34 -23
- package/dist/m365/spfx/commands/spfx-doctor.js +32 -48
- package/dist/m365/spo/commands/file/file-add.js +13 -13
- package/dist/m365/spo/commands/file/file-checkin.js +1 -1
- package/dist/m365/spo/commands/file/file-checkout.js +1 -1
- package/dist/m365/spo/commands/file/file-copy.js +38 -4
- package/dist/m365/spo/commands/file/file-list.js +4 -4
- package/dist/m365/spo/commands/file/file-move.js +2 -2
- package/dist/m365/spo/commands/file/file-remove.js +6 -6
- package/dist/m365/spo/commands/file/file-rename.js +2 -2
- package/dist/m365/spo/commands/file/file-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/file/file-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/file/file-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/file/file-version-clear.js +1 -1
- package/dist/m365/spo/commands/file/file-version-get.js +1 -1
- package/dist/m365/spo/commands/file/file-version-list.js +1 -1
- package/dist/m365/spo/commands/file/file-version-remove.js +1 -1
- package/dist/m365/spo/commands/file/file-version-restore.js +1 -1
- package/dist/m365/spo/commands/folder/folder-add.js +2 -4
- package/dist/m365/spo/commands/folder/folder-get.js +1 -1
- package/dist/m365/spo/commands/folder/folder-list.js +2 -2
- package/dist/m365/spo/commands/folder/folder-remove.js +7 -4
- package/dist/m365/spo/commands/folder/folder-rename.js +13 -17
- package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
- package/dist/m365/spo/commands/folder/folder-retentionlabel-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-add.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleassignment-remove.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-break.js +1 -1
- package/dist/m365/spo/commands/folder/folder-roleinheritance-reset.js +1 -1
- package/dist/m365/spo/commands/group/group-list.js +0 -1
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-get.js +16 -24
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -15
- package/dist/utils/planner.js +6 -3
- package/dist/utils/spo.js +1 -1
- package/docs/docs/cmd/aad/user/user-set.mdx +1 -1
- package/docs/docs/cmd/cli/config/config-list.mdx +78 -0
- package/docs/docs/cmd/flow/flow-enable.mdx +2 -2
- package/docs/docs/cmd/login.mdx +6 -0
- package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +85 -0
- package/docs/docs/cmd/pa/app/app-permission-remove.mdx +74 -0
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkin.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-checkout-undo.mdx +1 -9
- package/docs/docs/cmd/spo/file/file-checkout.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-copy.mdx +20 -16
- package/docs/docs/cmd/spo/file/file-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-list.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-move.mdx +2 -2
- package/docs/docs/cmd/spo/file/file-remove.mdx +8 -8
- package/docs/docs/cmd/spo/file/file-rename.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-retentionlabel-remove.mdx +3 -3
- package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinginfo-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-add.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-sharinglink-set.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-clear.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-get.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-list.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-remove.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-version-restore.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-add.mdx +76 -1
- package/docs/docs/cmd/spo/folder/folder-get.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-list.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-rename.mdx +5 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-retentionlabel-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +2 -2
- package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-break.mdx +1 -1
- package/docs/docs/cmd/spo/folder/folder-roleinheritance-reset.mdx +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-add.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-remove.mdx +1 -1
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +1 -1
- package/docs/docs/cmd/yammer/network/network-list.mdx +1 -1
- package/npm-shrinkwrap.json +685 -346
- package/package.json +13 -13
|
@@ -16,6 +16,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _SpoFolderAddCommand_instances, _SpoFolderAddCommand_initOptions, _SpoFolderAddCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
19
20
|
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
20
21
|
const validation_1 = require("../../../../utils/validation");
|
|
21
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -40,15 +41,12 @@ class SpoFolderAddCommand extends SpoCommand_1.default {
|
|
|
40
41
|
}
|
|
41
42
|
const parentFolderServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.parentFolderUrl);
|
|
42
43
|
const serverRelativeUrl = `${parentFolderServerRelativeUrl}/${args.options.name}`;
|
|
43
|
-
const requestUrl = `${args.options.webUrl}/_api/web/folders`;
|
|
44
|
+
const requestUrl = `${args.options.webUrl}/_api/web/folders/addUsingPath(decodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
44
45
|
const requestOptions = {
|
|
45
46
|
url: requestUrl,
|
|
46
47
|
headers: {
|
|
47
48
|
'accept': 'application/json;odata=nometadata'
|
|
48
49
|
},
|
|
49
|
-
data: {
|
|
50
|
-
'ServerRelativeUrl': serverRelativeUrl
|
|
51
|
-
},
|
|
52
50
|
responseType: 'json'
|
|
53
51
|
};
|
|
54
52
|
try {
|
|
@@ -52,7 +52,7 @@ class SpoFolderGetCommand extends SpoCommand_1.default {
|
|
|
52
52
|
}
|
|
53
53
|
else if (args.options.url) {
|
|
54
54
|
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
55
|
-
requestUrl += `/
|
|
55
|
+
requestUrl += `/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
56
56
|
}
|
|
57
57
|
if (args.options.withPermissions) {
|
|
58
58
|
requestUrl += `?$expand=ListItemAllFields/HasUniqueRoleAssignments,ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings`;
|
|
@@ -66,7 +66,7 @@ class SpoFolderListCommand extends SpoCommand_1.default {
|
|
|
66
66
|
}
|
|
67
67
|
const allFolders = [];
|
|
68
68
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, parentFolderUrl);
|
|
69
|
-
const requestUrl = `${args.options.webUrl}/_api/web/
|
|
69
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/Folders`;
|
|
70
70
|
const queryParams = [`$skip=${skip}`, `$top=${SpoFolderListCommand.pageSize}`];
|
|
71
71
|
if (fieldProperties.expandProperties.length > 0) {
|
|
72
72
|
queryParams.push(`$expand=${fieldProperties.expandProperties.join(',')}`);
|
|
@@ -78,7 +78,7 @@ class SpoFolderListCommand extends SpoCommand_1.default {
|
|
|
78
78
|
queryParams.push(`$filter=${args.options.filter}`);
|
|
79
79
|
}
|
|
80
80
|
const requestOptions = {
|
|
81
|
-
url: `${requestUrl}
|
|
81
|
+
url: `${requestUrl}?${queryParams.join('&')}`,
|
|
82
82
|
method: 'GET',
|
|
83
83
|
headers: {
|
|
84
84
|
'accept': 'application/json;odata=nometadata'
|
|
@@ -36,6 +36,9 @@ class SpoFolderRemoveCommand extends SpoCommand_1.default {
|
|
|
36
36
|
__classPrivateFieldGet(this, _SpoFolderRemoveCommand_instances, "m", _SpoFolderRemoveCommand_initOptions).call(this);
|
|
37
37
|
__classPrivateFieldGet(this, _SpoFolderRemoveCommand_instances, "m", _SpoFolderRemoveCommand_initValidators).call(this);
|
|
38
38
|
}
|
|
39
|
+
getExcludedOptionsWithUrls() {
|
|
40
|
+
return ['url'];
|
|
41
|
+
}
|
|
39
42
|
commandAction(logger, args) {
|
|
40
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
44
|
if (args.options.confirm) {
|
|
@@ -59,8 +62,8 @@ class SpoFolderRemoveCommand extends SpoCommand_1.default {
|
|
|
59
62
|
if (this.verbose) {
|
|
60
63
|
logger.logToStderr(`Removing folder in site at ${options.webUrl}...`);
|
|
61
64
|
}
|
|
62
|
-
const
|
|
63
|
-
let requestUrl = `${options.webUrl}/_api/web/
|
|
65
|
+
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.url);
|
|
66
|
+
let requestUrl = `${options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')`;
|
|
64
67
|
if (options.recycle) {
|
|
65
68
|
requestUrl += `/recycle()`;
|
|
66
69
|
}
|
|
@@ -86,8 +89,8 @@ class SpoFolderRemoveCommand extends SpoCommand_1.default {
|
|
|
86
89
|
_SpoFolderRemoveCommand_instances = new WeakSet(), _SpoFolderRemoveCommand_initTelemetry = function _SpoFolderRemoveCommand_initTelemetry() {
|
|
87
90
|
this.telemetry.push((args) => {
|
|
88
91
|
Object.assign(this.telemetryProperties, {
|
|
89
|
-
recycle:
|
|
90
|
-
confirm:
|
|
92
|
+
recycle: !!args.options.recycle,
|
|
93
|
+
confirm: !!args.options.confirm
|
|
91
94
|
});
|
|
92
95
|
});
|
|
93
96
|
}, _SpoFolderRemoveCommand_initOptions = function _SpoFolderRemoveCommand_initOptions() {
|
|
@@ -15,9 +15,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
};
|
|
16
16
|
var _SpoFolderRenameCommand_instances, _SpoFolderRenameCommand_initOptions, _SpoFolderRenameCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const config_1 = require("../../../../config");
|
|
19
18
|
const request_1 = require("../../../../request");
|
|
20
|
-
const
|
|
19
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
21
20
|
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
22
21
|
const validation_1 = require("../../../../utils/validation");
|
|
23
22
|
const SpoCommand_1 = require("../../../base/SpoCommand");
|
|
@@ -41,32 +40,29 @@ class SpoFolderRenameCommand extends SpoCommand_1.default {
|
|
|
41
40
|
commandAction(logger, args) {
|
|
42
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
42
|
try {
|
|
44
|
-
const contextResponse = yield spo_1.spo.getRequestDigest(args.options.webUrl);
|
|
45
|
-
const formDigestValue = contextResponse.FormDigestValue;
|
|
46
|
-
const webIdentityResp = yield spo_1.spo.getCurrentWebIdentity(args.options.webUrl, formDigestValue);
|
|
47
|
-
const folderObjectIdentity = yield spo_1.spo.getFolderIdentity(webIdentityResp.objectIdentity, args.options.webUrl, args.options.url, formDigestValue);
|
|
48
43
|
if (this.verbose) {
|
|
49
44
|
logger.logToStderr(`Renaming folder ${args.options.url} to ${args.options.name}`);
|
|
50
45
|
}
|
|
51
46
|
const serverRelativePath = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.url);
|
|
52
|
-
const serverRelativeUrlWithoutOldFolder = serverRelativePath.substring(0, serverRelativePath.lastIndexOf('/'));
|
|
53
|
-
const renamedServerRelativeUrl = `${serverRelativeUrlWithoutOldFolder}/${args.options.name}`;
|
|
54
47
|
const requestOptions = {
|
|
55
|
-
url: `${args.options.webUrl}/
|
|
48
|
+
url: `${args.options.webUrl}/_api/Web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativePath)}')/ListItemAllFields`,
|
|
56
49
|
headers: {
|
|
57
|
-
'
|
|
50
|
+
accept: 'application/json;odata=nometadata',
|
|
51
|
+
'if-match': '*'
|
|
58
52
|
},
|
|
59
|
-
data:
|
|
53
|
+
data: {
|
|
54
|
+
FileLeafRef: args.options.name,
|
|
55
|
+
Title: args.options.name
|
|
56
|
+
},
|
|
57
|
+
responseType: 'json'
|
|
60
58
|
};
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (contents && contents.ErrorInfo) {
|
|
65
|
-
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
59
|
+
const response = yield request_1.default.patch(requestOptions);
|
|
60
|
+
if (response && response['odata.null'] === true) {
|
|
61
|
+
throw 'Folder not found.';
|
|
66
62
|
}
|
|
67
63
|
}
|
|
68
64
|
catch (err) {
|
|
69
|
-
this.
|
|
65
|
+
this.handleRejectedODataJsonPromise(err);
|
|
70
66
|
}
|
|
71
67
|
});
|
|
72
68
|
}
|
|
@@ -89,7 +89,7 @@ class SpoFolderRetentionLabelEnsureCommand extends SpoCommand_1.default {
|
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
92
|
-
requestUrl += `
|
|
92
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
93
93
|
}
|
|
94
94
|
const requestOptions = {
|
|
95
95
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -107,7 +107,7 @@ class SpoFolderRetentionLabelRemoveCommand extends SpoCommand_1.default {
|
|
|
107
107
|
}
|
|
108
108
|
else {
|
|
109
109
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
110
|
-
requestUrl += `
|
|
110
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
111
111
|
}
|
|
112
112
|
const requestOptions = {
|
|
113
113
|
url: `${requestUrl}?$expand=ListItemAllFields,ListItemAllFields/ParentList&$select=ServerRelativeUrl,ListItemAllFields/ParentList/Id,ListItemAllFields/Id`,
|
|
@@ -53,7 +53,7 @@ class SpoFolderRoleAssignmentAddCommand extends SpoCommand_1.default {
|
|
|
53
53
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
requestUrl += `
|
|
56
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
57
57
|
}
|
|
58
58
|
const roleDefinitionId = yield this.getRoleDefinitionId(args.options);
|
|
59
59
|
if (args.options.upn) {
|
|
@@ -45,7 +45,7 @@ class SpoFolderRoleAssignmentRemoveCommand extends SpoCommand_1.default {
|
|
|
45
45
|
logger.logToStderr(`Removing role assignment from folder in site at ${args.options.webUrl}...`);
|
|
46
46
|
}
|
|
47
47
|
const serverRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(args.options.webUrl, args.options.folderUrl);
|
|
48
|
-
const requestUrl = `${args.options.webUrl}/_api/web/
|
|
48
|
+
const requestUrl = `${args.options.webUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
49
49
|
try {
|
|
50
50
|
if (args.options.upn) {
|
|
51
51
|
args.options.principalId = yield this.getUserPrincipalId(args.options);
|
|
@@ -48,7 +48,7 @@ class SpoFolderRoleInheritanceBreakCommand extends SpoCommand_1.default {
|
|
|
48
48
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
requestUrl += `
|
|
51
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
52
52
|
}
|
|
53
53
|
const requestOptions = {
|
|
54
54
|
url: `${requestUrl}/breakroleinheritance(${keepExistingPermissions})`,
|
|
@@ -47,7 +47,7 @@ class SpoFolderRoleInheritanceResetCommand extends SpoCommand_1.default {
|
|
|
47
47
|
requestUrl += `GetList('${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')`;
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
|
-
requestUrl += `
|
|
50
|
+
requestUrl += `GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(serverRelativeUrl)}')/ListItemAllFields`;
|
|
51
51
|
}
|
|
52
52
|
const requestOptions = {
|
|
53
53
|
url: `${requestUrl}/resetroleinheritance`,
|
|
@@ -73,7 +73,6 @@ class SpoGroupListCommand extends SpoCommand_1.default {
|
|
|
73
73
|
responseType: 'json'
|
|
74
74
|
};
|
|
75
75
|
const groupProperties = yield request_1.default.get(requestOptions);
|
|
76
|
-
logger.log(groupProperties);
|
|
77
76
|
if (!options.output || !Cli_1.Cli.shouldTrimOutput(options.output)) {
|
|
78
77
|
logger.log(groupProperties);
|
|
79
78
|
}
|
|
@@ -132,8 +132,8 @@ _SpoNavigationNodeSetCommand_instances = new WeakSet(), _SpoNavigationNodeSetCom
|
|
|
132
132
|
if (isValidSharePointUrl !== true) {
|
|
133
133
|
return isValidSharePointUrl;
|
|
134
134
|
}
|
|
135
|
-
if (args.options.audienceIds === undefined &&
|
|
136
|
-
return `Please specify
|
|
135
|
+
if (args.options.audienceIds === undefined && args.options.url === undefined && args.options.isExternal === undefined && !args.options.title && args.options.openInNewWindow === undefined) {
|
|
136
|
+
return `Please specify at least one property to update.`;
|
|
137
137
|
}
|
|
138
138
|
if (args.options.audienceIds) {
|
|
139
139
|
const audienceIdsSplitted = args.options.audienceIds.split(',');
|
|
@@ -16,13 +16,13 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
16
16
|
var _TeamsMeetingGetCommand_instances, _TeamsMeetingGetCommand_initTelemetry, _TeamsMeetingGetCommand_initOptions, _TeamsMeetingGetCommand_initValidators;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const Auth_1 = require("../../../../Auth");
|
|
19
|
-
const Cli_1 = require("../../../../cli/Cli");
|
|
20
19
|
const request_1 = require("../../../../request");
|
|
21
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
22
21
|
const commands_1 = require("../../commands");
|
|
23
22
|
const validation_1 = require("../../../../utils/validation");
|
|
24
23
|
const accessToken_1 = require("../../../../utils/accessToken");
|
|
25
|
-
const
|
|
24
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
25
|
+
const formatting_1 = require("../../../../utils/formatting");
|
|
26
26
|
class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
27
27
|
get name() {
|
|
28
28
|
return commands_1.default.MEETING_GET;
|
|
@@ -37,20 +37,6 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
37
37
|
__classPrivateFieldGet(this, _TeamsMeetingGetCommand_instances, "m", _TeamsMeetingGetCommand_initOptions).call(this);
|
|
38
38
|
__classPrivateFieldGet(this, _TeamsMeetingGetCommand_instances, "m", _TeamsMeetingGetCommand_initValidators).call(this);
|
|
39
39
|
}
|
|
40
|
-
getUserId(options) {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
const commandOptions = {
|
|
43
|
-
email: options.email,
|
|
44
|
-
userName: options.userName,
|
|
45
|
-
output: 'json',
|
|
46
|
-
debug: this.debug,
|
|
47
|
-
verbose: this.verbose
|
|
48
|
-
};
|
|
49
|
-
const output = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, commandOptions), { _: [] }) });
|
|
50
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
51
|
-
return getUserOutput.id;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
40
|
commandAction(logger, args) {
|
|
55
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
42
|
const isAppOnlyAccessToken = accessToken_1.accessToken.isAppOnlyAccessToken(Auth_1.default.service.accessTokens[this.resource].accessToken);
|
|
@@ -71,18 +57,13 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
71
57
|
let requestUrl = `${this.resource}/v1.0/`;
|
|
72
58
|
if (isAppOnlyAccessToken) {
|
|
73
59
|
requestUrl += 'users/';
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
const userId = yield this.getUserId(args.options);
|
|
79
|
-
requestUrl += userId;
|
|
80
|
-
}
|
|
60
|
+
const userId = yield this.getUserId(args.options);
|
|
61
|
+
requestUrl += userId;
|
|
81
62
|
}
|
|
82
63
|
else {
|
|
83
64
|
requestUrl += `me`;
|
|
84
65
|
}
|
|
85
|
-
requestUrl += `/onlineMeetings?$filter=JoinWebUrl eq '${
|
|
66
|
+
requestUrl += `/onlineMeetings?$filter=JoinWebUrl eq '${formatting_1.formatting.encodeQueryParameter(args.options.joinUrl)}'`;
|
|
86
67
|
const requestOptions = {
|
|
87
68
|
url: requestUrl,
|
|
88
69
|
headers: {
|
|
@@ -103,6 +84,17 @@ class TeamsMeetingGetCommand extends GraphCommand_1.default {
|
|
|
103
84
|
}
|
|
104
85
|
});
|
|
105
86
|
}
|
|
87
|
+
getUserId(options) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
if (options.userId) {
|
|
90
|
+
return options.userId;
|
|
91
|
+
}
|
|
92
|
+
if (options.userName) {
|
|
93
|
+
return aadUser_1.aadUser.getUserIdByUpn(options.userName);
|
|
94
|
+
}
|
|
95
|
+
return aadUser_1.aadUser.getUserIdByEmail(options.email);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
106
98
|
}
|
|
107
99
|
_TeamsMeetingGetCommand_instances = new WeakSet(), _TeamsMeetingGetCommand_initTelemetry = function _TeamsMeetingGetCommand_initTelemetry() {
|
|
108
100
|
this.telemetry.push((args) => {
|
|
@@ -21,8 +21,8 @@ const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
22
|
const odata_1 = require("../../../../utils/odata");
|
|
23
23
|
const validation_1 = require("../../../../utils/validation");
|
|
24
|
-
const AadUserGetCommand = require("../../../aad/commands/user/user-get");
|
|
25
24
|
const accessToken_1 = require("../../../../utils/accessToken");
|
|
25
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
26
26
|
class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
27
27
|
get name() {
|
|
28
28
|
return commands_1.default.MEETING_LIST;
|
|
@@ -60,7 +60,7 @@ class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
|
60
60
|
requestUrl += args.options.userName;
|
|
61
61
|
}
|
|
62
62
|
else if (args.options.email) {
|
|
63
|
-
const userId = yield
|
|
63
|
+
const userId = yield aadUser_1.aadUser.getUserIdByEmail(args.options.email);
|
|
64
64
|
requestUrl += userId;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -98,19 +98,6 @@ class TeamsMeetingListCommand extends GraphCommand_1.default {
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
getUserId(email) {
|
|
102
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
const options = {
|
|
104
|
-
email: email,
|
|
105
|
-
output: 'json',
|
|
106
|
-
debug: this.debug,
|
|
107
|
-
verbose: this.verbose
|
|
108
|
-
};
|
|
109
|
-
const output = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, options), { _: [] }) });
|
|
110
|
-
const getUserOutput = JSON.parse(output.stdout);
|
|
111
|
-
return getUserOutput.id;
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
101
|
}
|
|
115
102
|
_TeamsMeetingListCommand_instances = new WeakSet(), _TeamsMeetingListCommand_initTelemetry = function _TeamsMeetingListCommand_initTelemetry() {
|
|
116
103
|
this.telemetry.push((args) => {
|
package/dist/utils/planner.js
CHANGED
|
@@ -45,11 +45,14 @@ exports.planner = {
|
|
|
45
45
|
return odata_1.odata.getAllItems(`${graphResource}/v1.0/groups/${groupId}/planner/plans`, metadata);
|
|
46
46
|
},
|
|
47
47
|
/**
|
|
48
|
-
* Get
|
|
48
|
+
* Get the Planner plan for a specific Roster.
|
|
49
49
|
* @param rosterId Roster ID.
|
|
50
50
|
*/
|
|
51
|
-
|
|
52
|
-
return
|
|
51
|
+
getPlanByRosterId(rosterId, metadata = 'none') {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const plans = yield odata_1.odata.getAllItems(`${graphResource}/beta/planner/rosters/${rosterId}/plans`, metadata);
|
|
54
|
+
return plans[0];
|
|
55
|
+
});
|
|
53
56
|
},
|
|
54
57
|
/**
|
|
55
58
|
* Get Planner plan by title in a specific group.
|
package/dist/utils/spo.js
CHANGED
|
@@ -306,7 +306,7 @@ exports.spo = {
|
|
|
306
306
|
nextFolder += `/${folders[folderIndex]}`;
|
|
307
307
|
const folderServerRelativeUrl = urlUtil_1.urlUtil.getServerRelativePath(webFullUrl, nextFolder);
|
|
308
308
|
const requestOptions = {
|
|
309
|
-
url: `${webFullUrl}/_api/web/
|
|
309
|
+
url: `${webFullUrl}/_api/web/GetFolderByServerRelativePath(DecodedUrl='${formatting_1.formatting.encodeQueryParameter(folderServerRelativeUrl)}')`,
|
|
310
310
|
headers: {
|
|
311
311
|
'accept': 'application/json;odata=nometadata'
|
|
312
312
|
}
|
|
@@ -87,7 +87,7 @@ If the user with the specified ID or username doesn't exist, or if the specified
|
|
|
87
87
|
Update specific property _department_ of user with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_
|
|
88
88
|
|
|
89
89
|
```sh
|
|
90
|
-
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --
|
|
90
|
+
m365 aad user set --objectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --department IT
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
Update multiple properties of user by name
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import CLISettings from '/docs/_clisettings.mdx';
|
|
2
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
3
|
+
import Tabs from '@theme/Tabs';
|
|
4
|
+
import TabItem from '@theme/TabItem';
|
|
5
|
+
|
|
6
|
+
# cli config list
|
|
7
|
+
|
|
8
|
+
List all self set CLI for Microsoft 365 configurations
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
m365 cli config list [options]
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
|
|
18
|
+
<Global />
|
|
19
|
+
|
|
20
|
+
## Available settings
|
|
21
|
+
|
|
22
|
+
Following is the list of configuration settings available in CLI for Microsoft 365.
|
|
23
|
+
|
|
24
|
+
<CLISettings />
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
List all self set configuration keys with their value
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
m365 cli config list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Response
|
|
35
|
+
|
|
36
|
+
<Tabs>
|
|
37
|
+
<TabItem value="JSON">
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"errorOutput": "stdout"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
</TabItem>
|
|
46
|
+
<TabItem value="Text">
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
errorOutput: stdout
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
</TabItem>
|
|
53
|
+
<TabItem value="CSV">
|
|
54
|
+
|
|
55
|
+
```csv
|
|
56
|
+
errorOutput
|
|
57
|
+
stdout
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</TabItem>
|
|
61
|
+
<TabItem value="Markdown">
|
|
62
|
+
|
|
63
|
+
```md
|
|
64
|
+
# cli config list
|
|
65
|
+
|
|
66
|
+
Date: 29/6/2023
|
|
67
|
+
|
|
68
|
+
Property | Value
|
|
69
|
+
---------|-------
|
|
70
|
+
errorOutput | stdout
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</TabItem>
|
|
74
|
+
</Tabs>
|
|
75
|
+
|
|
76
|
+
## More information
|
|
77
|
+
|
|
78
|
+
- [Configuring the CLI for Microsoft 365](../../../user-guide/configuring-cli.mdx)
|
|
@@ -44,13 +44,13 @@ If the Power Automate flow with the name you specified doesn't exist, you will g
|
|
|
44
44
|
Enables Power Automate flow owned by the currently signed-in user
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
m365 flow enable --
|
|
47
|
+
m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Enables Power Automate flow owned by another user
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
m365 flow enable --
|
|
53
|
+
m365 flow enable --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --asAdmin
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
## Response
|
package/docs/docs/cmd/login.mdx
CHANGED
|
@@ -157,6 +157,12 @@ Log in to Microsoft 365 using your own Azure AD application that's restricted on
|
|
|
157
157
|
m365 login --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
+
Log in to Microsoft 365 using your own Azure AD application and a personal information exchange (.pfx) file
|
|
161
|
+
|
|
162
|
+
```sh
|
|
163
|
+
m365 login --authType certificate --appId 31359c7f-bd7e-475c-86db-fdb8c937548c --tenant 31359c7f-bd7e-475c-86db-fdb8c937548a --certificateFile /Users/user/dev/localhost.pfx --password 'pass@word1'
|
|
164
|
+
```
|
|
165
|
+
|
|
160
166
|
Log in to Microsoft 365 using the interactive browser authentication. Uses the identity of the current user.
|
|
161
167
|
|
|
162
168
|
```sh
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# pa app permission ensure
|
|
4
|
+
|
|
5
|
+
Assigns/updates permissions to a Power Apps app
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 pa app permission ensure [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`--appName <appName>`
|
|
17
|
+
: The name (GUID) of the Microsoft Power App.
|
|
18
|
+
|
|
19
|
+
`--roleName <roleName>`
|
|
20
|
+
: Permission level given to the app. Valid values: `CanEdit`, `CanView`. Sharing with the entire tenant is only supported with `CanView` role.
|
|
21
|
+
|
|
22
|
+
`--userId [userId]`
|
|
23
|
+
: The Azure AD ID of the user. Specify either `userId`, `userName`, `groupId`, `groupName`, or `tenant`.
|
|
24
|
+
|
|
25
|
+
`--userName [userName]`
|
|
26
|
+
: The user principal name of the user. Specify either `userId`, `userName`, `groupId`, `groupName`, or `tenant`.
|
|
27
|
+
|
|
28
|
+
`--groupId [groupId]`
|
|
29
|
+
: The Azure AD ID of the group. Specify either `userId`, `userName`, `groupId`, `groupName`, or `tenant`.
|
|
30
|
+
|
|
31
|
+
`--groupName [groupName]`
|
|
32
|
+
: The name of the Azure AD group. Specify either `userId`, `userName`, `groupId`, `groupName`, or `tenant`.
|
|
33
|
+
|
|
34
|
+
`--tenant`
|
|
35
|
+
: Share the app with the entire tenant. When specifying this, only `CanView` role is supported. Specify either `userId`, `userName`, `groupId`, `groupName`, or `tenant`.
|
|
36
|
+
|
|
37
|
+
`--sendInvitationMail`
|
|
38
|
+
: When set, an invitation mail will be sent.
|
|
39
|
+
|
|
40
|
+
`--asAdmin`
|
|
41
|
+
: Run the command as admin for apps you don't own.
|
|
42
|
+
|
|
43
|
+
`-e, --environmentName [environmentName]`
|
|
44
|
+
: The name of the environment. Specify only a value when running the command as admin.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
<Global />
|
|
48
|
+
|
|
49
|
+
## Remarks
|
|
50
|
+
|
|
51
|
+
:::note
|
|
52
|
+
|
|
53
|
+
When specifying a value for `groupId` or `groupName`, note that you can only grant permissions to security groups.
|
|
54
|
+
|
|
55
|
+
:::
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
Share a Power App app with another user with run-only permissions
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 pa app permission ensure --appName bc9f0a7e-53df-46af-b669-5888bb2f63d0 --userName john.doe@contoso.com --roleName CanView --sendInvitationMail
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Add co-owner permissions for a security group to a Power Apps app
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
m365 pa app permission ensure --appName bc9f0a7e-53df-46af-b669-5888bb2f63d0 --groupName Developers --roleName CanEdit
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Add permissions as admin to a Power App app that you do not own
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
m365 pa app permission ensure --environment Default-e535e809-c6a1-47b5-8951-d0898a64bf8a --appName bc9f0a7e-53df-46af-b669-5888bb2f63d0 --userId 42a28ec6-972f-4fdd-b483-50ee4b237f91 --roleName CanEdit --asAdmin
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Share a Power Apps app with everyone in the tenant
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
m365 pa app permission ensure --appName bc9f0a7e-53df-46af-b669-5888bb2f63d0 --roleName CanView --tenant
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Response
|
|
84
|
+
|
|
85
|
+
The command won't return a response on success.
|