@pnp/cli-microsoft365 6.10.0-beta.f43fa4d → 6.11.0-beta.6475e2e
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/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-copy.js +38 -4
- 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/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-copy.mdx +20 -10
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.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 +2 -2
- package/package.json +1 -1
|
@@ -614,28 +614,22 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
614
614
|
});
|
|
615
615
|
}
|
|
616
616
|
checkSharePointCompatibility(spfxVersion, prerequisites, args, fixes, logger) {
|
|
617
|
-
return
|
|
617
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
618
618
|
if (args.options.env) {
|
|
619
619
|
const sp = this.spVersionStringToEnum(args.options.env);
|
|
620
620
|
if ((prerequisites.sp & sp) === sp) {
|
|
621
621
|
logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Success, `Supported in ${SharePointVersion[sp]}`));
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
else {
|
|
625
|
-
logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `Not supported in ${SharePointVersion[sp]}`));
|
|
626
|
-
fixes.push(`Use SharePoint Framework v${(sp === SharePointVersion.SP2016 ? '1.1' : '1.4.1')}`);
|
|
627
|
-
reject(`SharePoint Framework v${spfxVersion} is not supported in ${SharePointVersion[sp]}`);
|
|
622
|
+
return;
|
|
628
623
|
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
624
|
+
logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `Not supported in ${SharePointVersion[sp]}`));
|
|
625
|
+
fixes.push(`Use SharePoint Framework v${(sp === SharePointVersion.SP2016 ? '1.1' : '1.4.1')}`);
|
|
626
|
+
throw `SharePoint Framework v${spfxVersion} is not supported in ${SharePointVersion[sp]}`;
|
|
632
627
|
}
|
|
633
628
|
});
|
|
634
629
|
}
|
|
635
630
|
checkNodeVersion(prerequisites, fixes, logger) {
|
|
636
|
-
return
|
|
637
|
-
|
|
638
|
-
.then((nodeVersion) => {
|
|
631
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
632
|
+
const nodeVersion = this.getNodeVersion();
|
|
639
633
|
this.checkStatus('Node', nodeVersion, prerequisites.node, OptionalOrRequired.Required, fixes, logger);
|
|
640
634
|
});
|
|
641
635
|
}
|
|
@@ -659,9 +653,8 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
659
653
|
});
|
|
660
654
|
}
|
|
661
655
|
checkYo(prerequisites, fixes, logger) {
|
|
662
|
-
return this
|
|
663
|
-
.getPackageVersion('yo', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger)
|
|
664
|
-
.then((yoVersion) => {
|
|
656
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
657
|
+
const yoVersion = yield this.getPackageVersion('yo', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger);
|
|
665
658
|
if (yoVersion) {
|
|
666
659
|
this.checkStatus('yo', yoVersion, prerequisites.yo, OptionalOrRequired.Required, fixes, logger);
|
|
667
660
|
}
|
|
@@ -672,9 +665,8 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
672
665
|
});
|
|
673
666
|
}
|
|
674
667
|
checkGulpCli(prerequisites, fixes, logger) {
|
|
675
|
-
return this
|
|
676
|
-
.getPackageVersion('gulp-cli', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger)
|
|
677
|
-
.then((gulpCliVersion) => {
|
|
668
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
669
|
+
const gulpCliVersion = yield this.getPackageVersion('gulp-cli', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger);
|
|
678
670
|
if (gulpCliVersion) {
|
|
679
671
|
this.checkStatus('gulp-cli', gulpCliVersion, prerequisites.gulpCli, OptionalOrRequired.Required, fixes, logger);
|
|
680
672
|
}
|
|
@@ -685,9 +677,8 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
685
677
|
});
|
|
686
678
|
}
|
|
687
679
|
checkGulp(fixes, logger) {
|
|
688
|
-
return this
|
|
689
|
-
.getPackageVersion('gulp', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger)
|
|
690
|
-
.then((gulpVersion) => {
|
|
680
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
681
|
+
const gulpVersion = yield this.getPackageVersion('gulp', PackageSearchMode.GlobalOnly, HandlePromise.Continue, logger);
|
|
691
682
|
if (gulpVersion) {
|
|
692
683
|
logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `gulp should be removed`));
|
|
693
684
|
fixes.push('npm un -g gulp');
|
|
@@ -695,9 +686,8 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
695
686
|
});
|
|
696
687
|
}
|
|
697
688
|
checkTypeScript(fixes, logger) {
|
|
698
|
-
return this
|
|
699
|
-
.getPackageVersion('typescript', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger)
|
|
700
|
-
.then((typeScriptVersion) => {
|
|
689
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
690
|
+
const typeScriptVersion = yield this.getPackageVersion('typescript', PackageSearchMode.LocalOnly, HandlePromise.Continue, logger);
|
|
701
691
|
if (typeScriptVersion) {
|
|
702
692
|
logger.log(formatting_1.formatting.getStatus(formatting_1.CheckStatus.Failure, `typescript v${typeScriptVersion} installed in the project`));
|
|
703
693
|
fixes.push('npm un typescript');
|
|
@@ -757,41 +747,35 @@ class SpfxDoctorCommand extends base_project_command_1.BaseProjectCommand {
|
|
|
757
747
|
});
|
|
758
748
|
}
|
|
759
749
|
getPackageVersion(packageName, searchMode, handlePromise, logger) {
|
|
760
|
-
return
|
|
750
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
761
751
|
const args = ['ls', packageName, '--depth=0', '--json'];
|
|
762
752
|
if (searchMode === PackageSearchMode.GlobalOnly) {
|
|
763
753
|
args.push('-g');
|
|
764
754
|
}
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
.
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
.catch(() => {
|
|
755
|
+
let version;
|
|
756
|
+
try {
|
|
757
|
+
version = yield this.getPackageVersionFromNpm(args, logger);
|
|
758
|
+
}
|
|
759
|
+
catch (_a) {
|
|
771
760
|
if (searchMode === PackageSearchMode.LocalAndGlobal) {
|
|
772
761
|
args.push('-g');
|
|
773
|
-
|
|
762
|
+
version = yield this.getPackageVersionFromNpm(args, logger);
|
|
774
763
|
}
|
|
775
764
|
else {
|
|
776
|
-
|
|
765
|
+
version = '';
|
|
777
766
|
}
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
767
|
+
}
|
|
768
|
+
if (version) {
|
|
769
|
+
return version;
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
if (handlePromise === HandlePromise.Continue) {
|
|
773
|
+
return '';
|
|
782
774
|
}
|
|
783
775
|
else {
|
|
784
|
-
|
|
785
|
-
resolve('');
|
|
786
|
-
}
|
|
787
|
-
else {
|
|
788
|
-
reject();
|
|
789
|
-
}
|
|
776
|
+
throw new Error();
|
|
790
777
|
}
|
|
791
|
-
}
|
|
792
|
-
.catch((err) => {
|
|
793
|
-
reject(err);
|
|
794
|
-
});
|
|
778
|
+
}
|
|
795
779
|
});
|
|
796
780
|
}
|
|
797
781
|
getPackageVersionFromNpm(args, logger) {
|
|
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _SpoFileCopyCommand_instances, _SpoFileCopyCommand_initTelemetry, _SpoFileCopyCommand_initOptions, _SpoFileCopyCommand_initValidators;
|
|
16
|
+
var _SpoFileCopyCommand_instances, _SpoFileCopyCommand_initTelemetry, _SpoFileCopyCommand_initOptions, _SpoFileCopyCommand_initValidators, _SpoFileCopyCommand_initOptionSets;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
const request_1 = require("../../../../request");
|
|
19
19
|
const urlUtil_1 = require("../../../../utils/urlUtil");
|
|
@@ -34,11 +34,13 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
34
34
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initTelemetry).call(this);
|
|
35
35
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initOptions).call(this);
|
|
36
36
|
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initValidators).call(this);
|
|
37
|
+
__classPrivateFieldGet(this, _SpoFileCopyCommand_instances, "m", _SpoFileCopyCommand_initOptionSets).call(this);
|
|
37
38
|
}
|
|
38
39
|
commandAction(logger, args) {
|
|
39
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
41
|
try {
|
|
41
|
-
const
|
|
42
|
+
const sourceServerRelativePath = yield this.getSourcePath(logger, args.options);
|
|
43
|
+
const sourcePath = this.getAbsoluteUrl(args.options.webUrl, sourceServerRelativePath);
|
|
42
44
|
let destinationPath = this.getAbsoluteUrl(args.options.webUrl, args.options.targetUrl) + '/';
|
|
43
45
|
if (args.options.newName) {
|
|
44
46
|
destinationPath += args.options.newName;
|
|
@@ -66,6 +68,7 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
66
68
|
overwrite: args.options.nameConflictBehavior === 'replace',
|
|
67
69
|
options: {
|
|
68
70
|
KeepBoth: args.options.nameConflictBehavior === 'rename',
|
|
71
|
+
ResetAuthorAndCreatedOnCopy: !!args.options.resetAuthorAndCreated,
|
|
69
72
|
ShouldBypassSharedLocks: !!args.options.bypassSharedLock
|
|
70
73
|
}
|
|
71
74
|
}
|
|
@@ -77,6 +80,25 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
77
80
|
}
|
|
78
81
|
});
|
|
79
82
|
}
|
|
83
|
+
getSourcePath(logger, options) {
|
|
84
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
85
|
+
if (options.sourceUrl) {
|
|
86
|
+
return urlUtil_1.urlUtil.getServerRelativePath(options.webUrl, options.sourceUrl);
|
|
87
|
+
}
|
|
88
|
+
if (this.verbose) {
|
|
89
|
+
logger.logToStderr(`Retrieving server-relative path for file with ID '${options.sourceId}'...`);
|
|
90
|
+
}
|
|
91
|
+
const requestOptions = {
|
|
92
|
+
url: `${options.webUrl}/_api/Web/GetFileById('${options.sourceId}')?$select=ServerRelativePath`,
|
|
93
|
+
headers: {
|
|
94
|
+
accept: 'application/json;odata=nometadata'
|
|
95
|
+
},
|
|
96
|
+
responseType: 'json'
|
|
97
|
+
};
|
|
98
|
+
const file = yield request_1.default.get(requestOptions);
|
|
99
|
+
return file.ServerRelativePath.DecodedUrl;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
80
102
|
getAbsoluteUrl(webUrl, url) {
|
|
81
103
|
return url.startsWith('https://') ? url : urlUtil_1.urlUtil.getAbsoluteUrl(webUrl, url);
|
|
82
104
|
}
|
|
@@ -84,8 +106,11 @@ class SpoFileCopyCommand extends SpoCommand_1.default {
|
|
|
84
106
|
_SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry = function _SpoFileCopyCommand_initTelemetry() {
|
|
85
107
|
this.telemetry.push((args) => {
|
|
86
108
|
Object.assign(this.telemetryProperties, {
|
|
109
|
+
sourceUrl: typeof args.options.sourceUrl !== 'undefined',
|
|
110
|
+
sourceId: typeof args.options.sourceId !== 'undefined',
|
|
87
111
|
newName: typeof args.options.newName !== 'undefined',
|
|
88
112
|
nameConflictBehavior: args.options.nameConflictBehavior || false,
|
|
113
|
+
resetAuthorAndCreated: !!args.options.resetAuthorAndCreated,
|
|
89
114
|
bypassSharedLock: !!args.options.bypassSharedLock
|
|
90
115
|
});
|
|
91
116
|
});
|
|
@@ -93,7 +118,9 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
93
118
|
this.options.unshift({
|
|
94
119
|
option: '-u, --webUrl <webUrl>'
|
|
95
120
|
}, {
|
|
96
|
-
option: '-s, --sourceUrl
|
|
121
|
+
option: '-s, --sourceUrl [sourceUrl]'
|
|
122
|
+
}, {
|
|
123
|
+
option: '-i, --sourceId [sourceId]'
|
|
97
124
|
}, {
|
|
98
125
|
option: '-t, --targetUrl <targetUrl>'
|
|
99
126
|
}, {
|
|
@@ -101,6 +128,8 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
101
128
|
}, {
|
|
102
129
|
option: '--nameConflictBehavior [nameConflictBehavior]',
|
|
103
130
|
autocomplete: this.nameConflictBehaviorOptions
|
|
131
|
+
}, {
|
|
132
|
+
option: '--resetAuthorAndCreated'
|
|
104
133
|
}, {
|
|
105
134
|
option: '--bypassSharedLock'
|
|
106
135
|
});
|
|
@@ -110,11 +139,16 @@ _SpoFileCopyCommand_instances = new WeakSet(), _SpoFileCopyCommand_initTelemetry
|
|
|
110
139
|
if (isValidSharePointUrl !== true) {
|
|
111
140
|
return isValidSharePointUrl;
|
|
112
141
|
}
|
|
142
|
+
if (args.options.sourceId && !validation_1.validation.isValidGuid(args.options.sourceId)) {
|
|
143
|
+
return `${args.options.sourceId} is not a valid GUID for sourceId.`;
|
|
144
|
+
}
|
|
113
145
|
if (args.options.nameConflictBehavior && this.nameConflictBehaviorOptions.indexOf(args.options.nameConflictBehavior) === -1) {
|
|
114
|
-
return `${args.options.nameConflictBehavior} is not a valid nameConflictBehavior value. Allowed values: ${this.nameConflictBehaviorOptions.join(', ')}
|
|
146
|
+
return `${args.options.nameConflictBehavior} is not a valid nameConflictBehavior value. Allowed values: ${this.nameConflictBehaviorOptions.join(', ')}.`;
|
|
115
147
|
}
|
|
116
148
|
return true;
|
|
117
149
|
}));
|
|
150
|
+
}, _SpoFileCopyCommand_initOptionSets = function _SpoFileCopyCommand_initOptionSets() {
|
|
151
|
+
this.optionSets.push({ options: ['sourceUrl', 'sourceId'] });
|
|
118
152
|
};
|
|
119
153
|
module.exports = new SpoFileCopyCommand();
|
|
120
154
|
//# sourceMappingURL=file-copy.js.map
|
|
@@ -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.
|
|
@@ -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.
|