@pnp/cli-microsoft365 6.3.0 → 6.4.0-beta.140530d
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/.devcontainer/Dockerfile +5 -2
- package/.eslintrc.js +4 -0
- package/Dockerfile +6 -3
- package/README.md +12 -1
- package/dist/Auth.js +1 -3
- package/dist/Command.js +1 -0
- package/dist/m365/aad/commands/user/user-get.js +3 -0
- package/dist/m365/aad/commands/user/user-license-remove.js +2 -1
- package/dist/m365/aad/commands/user/user-recyclebinitem-restore.js +2 -9
- package/dist/m365/aad/commands/user/user-set.js +3 -0
- package/dist/m365/aad/commands/user/user-signin-list.js +3 -0
- package/dist/m365/file/commands/file-list.js +5 -1
- package/dist/m365/flow/commands/flow-disable.js +9 -2
- package/dist/m365/flow/commands/flow-enable.js +9 -2
- package/dist/m365/flow/commands/flow-get.js +9 -2
- package/dist/m365/flow/commands/flow-list.js +1 -1
- package/dist/m365/flow/commands/flow-remove.js +2 -2
- package/dist/m365/flow/commands/owner/owner-ensure.js +147 -0
- package/dist/m365/flow/commands/owner/owner-list.js +89 -0
- package/dist/m365/flow/commands/owner/owner-remove.js +147 -0
- package/dist/m365/flow/commands/run/run-cancel.js +9 -2
- package/dist/m365/flow/commands/run/run-list.js +5 -2
- package/dist/m365/flow/commands.js +3 -0
- package/dist/m365/planner/commands/roster/roster-member-add.js +3 -0
- package/dist/m365/planner/commands/roster/roster-member-get.js +98 -0
- package/dist/m365/planner/commands.js +1 -0
- package/dist/m365/purview/commands/retentionevent/retentionevent-add.js +138 -0
- package/dist/m365/purview/commands/retentionlabel/retentionlabel-add.js +48 -14
- package/dist/m365/purview/commands.js +1 -0
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.17.0-beta.1.js +59 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +43 -29
- package/dist/m365/spo/commands/commandset/commandset-add.js +138 -0
- package/dist/m365/spo/commands/commandset/commandset-get.js +128 -0
- package/dist/m365/spo/commands/commandset/commandset-list.js +77 -0
- package/dist/m365/spo/commands/commandset/commandset-remove.js +146 -0
- package/dist/m365/spo/commands/commandset/commandset-set.js +182 -0
- package/dist/m365/spo/commands/customaction/customaction-get.js +27 -7
- package/dist/m365/spo/commands/file/file-move.js +1 -1
- package/dist/m365/spo/commands/group/group-member-add.js +54 -95
- package/dist/m365/spo/commands/list/list-add.js +11 -8
- package/dist/m365/spo/commands/list/list-set.js +3 -3
- package/dist/m365/spo/commands/navigation/navigation-node-add.js +5 -4
- package/dist/m365/spo/commands/navigation/navigation-node-set.js +5 -1
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +118 -0
- package/dist/m365/spo/commands/term/term-get.js +68 -48
- package/dist/m365/spo/commands/user/user-ensure.js +105 -0
- package/dist/m365/spo/commands.js +7 -0
- package/dist/m365/todo/commands/task/task-add.js +35 -3
- package/dist/utils/aadGroup.js +18 -0
- package/dist/utils/aadUser.js +37 -0
- package/dist/utils/md.js +7 -0
- package/dist/utils/spo.js +32 -0
- package/docs/docs/cmd/aad/app/app-add.md +3 -3
- package/docs/docs/cmd/aad/approleassignment/approleassignment-add.md +5 -5
- package/docs/docs/cmd/aad/approleassignment/approleassignment-remove.md +3 -3
- package/docs/docs/cmd/aad/user/user-remove.md +1 -1
- package/docs/docs/cmd/cli/completion/completion-clink-update.md +4 -4
- package/docs/docs/cmd/flow/owner/owner-ensure.md +61 -0
- package/docs/docs/cmd/flow/owner/owner-list.md +90 -0
- package/docs/docs/cmd/flow/owner/owner-remove.md +67 -0
- package/docs/docs/cmd/flow/run/run-list.md +28 -0
- package/docs/docs/cmd/onenote/page/page-list.md +1 -1
- package/docs/docs/cmd/outlook/mail/mail-send.md +7 -3
- package/docs/docs/cmd/outlook/message/message-get.md +143 -0
- package/docs/docs/cmd/outlook/message/message-list.md +119 -0
- package/docs/docs/cmd/outlook/message/message-move.md +4 -0
- package/docs/docs/cmd/outlook/report/report-mailactivitycounts.md +40 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityusercounts.md +40 -0
- package/docs/docs/cmd/outlook/report/report-mailactivityuserdetail.md +45 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageappsusercounts.md +43 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageusercounts.md +44 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageuserdetail.md +48 -0
- package/docs/docs/cmd/outlook/report/report-mailappusageversionsusercounts.md +41 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagedetail.md +49 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagemailboxcount.md +37 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagequotastatusmailboxcounts.md +40 -0
- package/docs/docs/cmd/outlook/report/report-mailboxusagestorage.md +36 -0
- package/docs/docs/cmd/outlook/room/room-list.md +81 -0
- package/docs/docs/cmd/outlook/roomlist/roomlist-list.md +58 -0
- package/docs/docs/cmd/planner/plan/plan-add.md +3 -3
- package/docs/docs/cmd/planner/plan/plan-set.md +73 -7
- package/docs/docs/cmd/planner/roster/roster-add.md +16 -1
- package/docs/docs/cmd/planner/roster/roster-member-get.md +87 -0
- package/docs/docs/cmd/planner/task/task-add.md +230 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-add.md +55 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-list.md +55 -0
- package/docs/docs/cmd/planner/task/task-checklistitem-remove.md +4 -0
- package/docs/docs/cmd/planner/task/task-get.md +131 -0
- package/docs/docs/cmd/planner/task/task-list.md +92 -0
- package/docs/docs/cmd/planner/task/task-reference-add.md +46 -0
- package/docs/docs/cmd/planner/task/task-reference-list.md +46 -0
- package/docs/docs/cmd/planner/task/task-reference-remove.md +4 -0
- package/docs/docs/cmd/planner/task/task-remove.md +4 -0
- package/docs/docs/cmd/planner/task/task-set.md +230 -0
- package/docs/docs/cmd/planner/tenant/tenant-settings-list.md +55 -0
- package/docs/docs/cmd/planner/tenant/tenant-settings-set.md +55 -0
- package/docs/docs/cmd/pp/card/card-get.md +2 -2
- package/docs/docs/cmd/pp/card/card-list.md +2 -2
- package/docs/docs/cmd/purview/retentionevent/retentionevent-add.md +149 -0
- package/docs/docs/cmd/purview/retentioneventtype/retentioneventtype-add.md +7 -7
- package/docs/docs/cmd/purview/retentionlabel/retentionlabel-add.md +12 -0
- package/docs/docs/cmd/skype/report/report-activitycounts.md +38 -0
- package/docs/docs/cmd/skype/report/report-activityusercounts.md +38 -0
- package/docs/docs/cmd/skype/report/report-activityuserdetail.md +67 -0
- package/docs/docs/cmd/spfx/project/project-doctor.md +3 -3
- package/docs/docs/cmd/spfx/project/project-externalize.md +3 -3
- package/docs/docs/cmd/spfx/project/project-permissions-grant.md +21 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.md +3 -3
- package/docs/docs/cmd/spfx/spfx-doctor.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-get.md +6 -6
- package/docs/docs/cmd/spo/cdn/cdn-origin-add.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-origin-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-origin-remove.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-list.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-policy-set.md +3 -3
- package/docs/docs/cmd/spo/cdn/cdn-set.md +3 -3
- package/docs/docs/cmd/spo/commandset/commandset-add.md +159 -0
- package/docs/docs/cmd/spo/commandset/commandset-get.md +149 -0
- package/docs/docs/cmd/spo/commandset/commandset-list.md +109 -0
- package/docs/docs/cmd/spo/commandset/commandset-remove.md +55 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.md +71 -0
- package/docs/docs/cmd/spo/customaction/customaction-get.md +113 -11
- package/docs/docs/cmd/spo/externaluser/externaluser-list.md +2 -0
- package/docs/docs/cmd/spo/group/group-member-add.md +26 -4
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-get.md +2 -0
- package/docs/docs/cmd/spo/hidedefaultthemes/hidedefaultthemes-set.md +2 -0
- package/docs/docs/cmd/spo/homesite/homesite-remove.md +2 -0
- package/docs/docs/cmd/spo/homesite/homesite-set.md +2 -0
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-get.md +2 -0
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-remove.md +2 -0
- package/docs/docs/cmd/spo/knowledgehub/knowledgehub-set.md +3 -3
- package/docs/docs/cmd/spo/list/list-add.md +2 -2
- package/docs/docs/cmd/spo/list/list-set.md +2 -2
- package/docs/docs/cmd/spo/listitem/listitem-add.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-batch-add.md +1 -1
- package/docs/docs/cmd/spo/listitem/listitem-set.md +1 -1
- package/docs/docs/cmd/spo/navigation/navigation-node-add.md +3 -3
- package/docs/docs/cmd/spo/navigation/navigation-node-set.md +2 -2
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-add.md +2 -0
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-list.md +2 -0
- package/docs/docs/cmd/spo/orgassetslibrary/orgassetslibrary-remove.md +2 -0
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-list.md +2 -0
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-remove.md +2 -0
- package/docs/docs/cmd/spo/orgnewssite/orgnewssite-set.md +3 -3
- package/docs/docs/cmd/spo/site/site-appcatalog-add.md +2 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.md +3 -3
- package/docs/docs/cmd/spo/site/site-commsite-enable.md +2 -0
- package/docs/docs/cmd/spo/site/site-list.md +3 -3
- package/docs/docs/cmd/spo/site/site-remove.md +3 -3
- package/docs/docs/cmd/spo/site/site-rename.md +3 -3
- package/docs/docs/cmd/spo/site/site-set.md +5 -5
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.md +3 -3
- package/docs/docs/cmd/spo/storageentity/storageentity-set.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.md +2 -0
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-add.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.md +142 -0
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.md +2 -0
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.md +3 -3
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.md +2 -0
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.md +28 -26
- package/docs/docs/cmd/spo/term/term-add.md +3 -3
- package/docs/docs/cmd/spo/term/term-get.md +3 -3
- package/docs/docs/cmd/spo/term/term-group-add.md +2 -0
- package/docs/docs/cmd/spo/term/term-group-get.md +2 -0
- package/docs/docs/cmd/spo/term/term-group-list.md +2 -0
- package/docs/docs/cmd/spo/term/term-list.md +3 -1
- package/docs/docs/cmd/spo/term/term-set-add.md +3 -3
- package/docs/docs/cmd/spo/term/term-set-get.md +2 -0
- package/docs/docs/cmd/spo/term/term-set-list.md +2 -0
- package/docs/docs/cmd/spo/theme/theme-apply.md +3 -3
- package/docs/docs/cmd/spo/theme/theme-get.md +2 -0
- package/docs/docs/cmd/spo/theme/theme-list.md +2 -0
- package/docs/docs/cmd/spo/theme/theme-remove.md +2 -0
- package/docs/docs/cmd/spo/theme/theme-set.md +3 -3
- package/docs/docs/cmd/spo/user/user-ensure.md +109 -0
- package/docs/docs/cmd/teams/channel/channel-get.md +1 -1
- package/docs/docs/cmd/teams/channel/channel-member-add.md +2 -2
- package/docs/docs/cmd/teams/message/message-get.md +39 -4
- package/docs/docs/cmd/teams/message/message-list.md +41 -6
- package/docs/docs/cmd/teams/message/message-reply-list.md +39 -4
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-list.md +20 -2
- package/docs/docs/cmd/teams/messagingsettings/messagingsettings-set.md +8 -8
- package/docs/docs/cmd/teams/report/report-deviceusagedistributionusercounts.md +12 -5
- package/docs/docs/cmd/teams/report/report-deviceusageusercounts.md +13 -6
- package/docs/docs/cmd/teams/report/report-deviceusageuserdetail.md +14 -7
- package/docs/docs/cmd/teams/report/report-directroutingcalls.md +13 -6
- package/docs/docs/cmd/teams/report/report-pstncalls.md +13 -6
- package/docs/docs/cmd/teams/report/report-useractivitycounts.md +13 -6
- package/docs/docs/cmd/teams/report/report-useractivityusercounts.md +13 -6
- package/docs/docs/cmd/teams/report/report-useractivityuserdetail.md +13 -6
- package/docs/docs/cmd/teams/tab/tab-add.md +16 -0
- package/docs/docs/cmd/teams/tab/tab-get.md +17 -0
- package/docs/docs/cmd/teams/tab/tab-list.md +19 -0
- package/docs/docs/cmd/teams/team/team-add.md +77 -8
- package/docs/docs/cmd/teams/team/team-app-list.md +18 -2
- package/docs/docs/cmd/teams/team/team-archive.md +2 -2
- package/docs/docs/cmd/teams/team/team-clone.md +8 -8
- package/docs/docs/cmd/teams/team/team-get.md +34 -4
- package/docs/docs/cmd/teams/team/team-list.md +34 -3
- package/docs/docs/cmd/teams/team/team-remove.md +3 -3
- package/docs/docs/cmd/teams/team/team-set.md +8 -8
- package/docs/docs/cmd/teams/team/team-unarchive.md +3 -2
- package/docs/docs/cmd/teams/user/user-app-add.md +3 -3
- package/docs/docs/cmd/teams/user/user-app-list.md +18 -2
- package/docs/docs/cmd/teams/user/user-app-remove.md +4 -4
- package/docs/docs/cmd/teams/user/user-list.md +21 -4
- package/docs/docs/cmd/todo/task/task-add.md +47 -2
- package/npm-shrinkwrap.json +279 -194
- package/package.json +15 -14
|
@@ -35,11 +35,12 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
35
35
|
__classPrivateFieldGet(this, _TodoTaskAddCommand_instances, "m", _TodoTaskAddCommand_initOptionSets).call(this);
|
|
36
36
|
}
|
|
37
37
|
commandAction(logger, args) {
|
|
38
|
-
var _a, _b;
|
|
38
|
+
var _a, _b, _c;
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
const endpoint = `${this.resource}/v1.0`;
|
|
41
41
|
try {
|
|
42
42
|
const listId = yield this.getTodoListId(args);
|
|
43
|
+
const status = args.options.status && TodoTaskAddCommand.allowedStatuses.filter(x => x.toLowerCase() === args.options.status.toLowerCase())[0];
|
|
43
44
|
const requestOptions = {
|
|
44
45
|
url: `${endpoint}/me/todo/lists/${listId}/tasks`,
|
|
45
46
|
headers: {
|
|
@@ -54,7 +55,11 @@ class TodoTaskAddCommand extends GraphCommand_1.default {
|
|
|
54
55
|
},
|
|
55
56
|
importance: (_b = args.options.importance) === null || _b === void 0 ? void 0 : _b.toLowerCase(),
|
|
56
57
|
dueDateTime: this.getDateTimeTimeZone(args.options.dueDateTime),
|
|
57
|
-
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime)
|
|
58
|
+
reminderDateTime: this.getDateTimeTimeZone(args.options.reminderDateTime),
|
|
59
|
+
categories: (_c = args.options.categories) === null || _c === void 0 ? void 0 : _c.split(','),
|
|
60
|
+
completedDateTime: this.getDateTimeTimeZone(args.options.completedDateTime),
|
|
61
|
+
startDateTime: this.getDateTimeTimeZone(args.options.startDateTime),
|
|
62
|
+
status: status
|
|
58
63
|
},
|
|
59
64
|
responseType: 'json'
|
|
60
65
|
};
|
|
@@ -105,7 +110,11 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
105
110
|
bodyContentType: args.options.bodyContentType,
|
|
106
111
|
dueDateTime: typeof args.options.dueDateTime !== 'undefined',
|
|
107
112
|
importance: args.options.importance,
|
|
108
|
-
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined'
|
|
113
|
+
reminderDateTime: typeof args.options.reminderDateTime !== 'undefined',
|
|
114
|
+
categories: typeof args.options.categories !== 'undefined',
|
|
115
|
+
completedDateTime: typeof args.options.completedDateTime !== 'undefined',
|
|
116
|
+
startDateTime: typeof args.options.startDateTime !== 'undefined',
|
|
117
|
+
status: typeof args.options.status !== 'undefined'
|
|
109
118
|
});
|
|
110
119
|
});
|
|
111
120
|
}, _TodoTaskAddCommand_initOptions = function _TodoTaskAddCommand_initOptions() {
|
|
@@ -127,9 +136,19 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
127
136
|
autocomplete: ['low', 'normal', 'high']
|
|
128
137
|
}, {
|
|
129
138
|
option: '--reminderDateTime [reminderDateTime]'
|
|
139
|
+
}, {
|
|
140
|
+
option: '--categories [categories]'
|
|
141
|
+
}, {
|
|
142
|
+
option: '--completedDateTime [completedDateTime]'
|
|
143
|
+
}, {
|
|
144
|
+
option: '--startDateTime [startDateTime]'
|
|
145
|
+
}, {
|
|
146
|
+
option: '--status [status]',
|
|
147
|
+
autocomplete: TodoTaskAddCommand.allowedStatuses
|
|
130
148
|
});
|
|
131
149
|
}, _TodoTaskAddCommand_initValidators = function _TodoTaskAddCommand_initValidators() {
|
|
132
150
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
var _a;
|
|
133
152
|
if (args.options.bodyContentType && ['text', 'html'].indexOf(args.options.bodyContentType.toLowerCase()) === -1) {
|
|
134
153
|
return `'${args.options.bodyContentType}' is not a valid value for the bodyContentType option. Allowed values are text|html`;
|
|
135
154
|
}
|
|
@@ -142,10 +161,23 @@ _TodoTaskAddCommand_instances = new WeakSet(), _TodoTaskAddCommand_initTelemetry
|
|
|
142
161
|
if (args.options.reminderDateTime && !validation_1.validation.isValidISODateTime(args.options.reminderDateTime)) {
|
|
143
162
|
return `'${args.options.reminderDateTime}' is not a valid ISO date string`;
|
|
144
163
|
}
|
|
164
|
+
if (args.options.completedDateTime && !validation_1.validation.isValidISODateTime(args.options.completedDateTime)) {
|
|
165
|
+
return `'${args.options.completedDateTime}' is not a valid datetime.`;
|
|
166
|
+
}
|
|
167
|
+
if (args.options.startDateTime && !validation_1.validation.isValidISODateTime(args.options.startDateTime)) {
|
|
168
|
+
return `'${args.options.startDateTime}' is not a valid datetime.`;
|
|
169
|
+
}
|
|
170
|
+
if (args.options.status && TodoTaskAddCommand.allowedStatuses.map(x => x.toLowerCase()).indexOf(args.options.status.toLowerCase()) === -1) {
|
|
171
|
+
return `${args.options.status} is not a valid value for status. Valid values are ${TodoTaskAddCommand.allowedStatuses.join(', ')}`;
|
|
172
|
+
}
|
|
173
|
+
if (args.options.completedDateTime && ((_a = args.options.status) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== 'completed') {
|
|
174
|
+
return `The completedDateTime option can only be used when the status option is set to completed`;
|
|
175
|
+
}
|
|
145
176
|
return true;
|
|
146
177
|
}));
|
|
147
178
|
}, _TodoTaskAddCommand_initOptionSets = function _TodoTaskAddCommand_initOptionSets() {
|
|
148
179
|
this.optionSets.push({ options: ['listId', 'listName'] });
|
|
149
180
|
};
|
|
181
|
+
TodoTaskAddCommand.allowedStatuses = ['notStarted', 'inProgress', 'completed', 'waitingOnOthers', 'deferred'];
|
|
150
182
|
module.exports = new TodoTaskAddCommand();
|
|
151
183
|
//# sourceMappingURL=task-add.js.map
|
package/dist/utils/aadGroup.js
CHANGED
|
@@ -53,6 +53,24 @@ exports.aadGroup = {
|
|
|
53
53
|
}
|
|
54
54
|
return groups[0];
|
|
55
55
|
});
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Get id of a group by its display name.
|
|
59
|
+
* @param displayName Group display name.
|
|
60
|
+
* @throws Error when group was not found.
|
|
61
|
+
* @throws Error when multiple groups with the same name were found.
|
|
62
|
+
*/
|
|
63
|
+
getGroupIdByDisplayName(displayName) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const groups = yield odata_1.odata.getAllItems(`${graphResource}/v1.0/groups?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(displayName)}'&$select=id`);
|
|
66
|
+
if (!groups.length) {
|
|
67
|
+
throw Error(`The specified group '${displayName}' does not exist.`);
|
|
68
|
+
}
|
|
69
|
+
if (groups.length > 1) {
|
|
70
|
+
throw Error(`Multiple groups with name '${displayName}' found: ${groups.map(x => x.id).join(',')}.`);
|
|
71
|
+
}
|
|
72
|
+
return groups[0].id;
|
|
73
|
+
});
|
|
56
74
|
}
|
|
57
75
|
};
|
|
58
76
|
//# sourceMappingURL=aadGroup.js.map
|
package/dist/utils/aadUser.js
CHANGED
|
@@ -33,6 +33,43 @@ exports.aadUser = {
|
|
|
33
33
|
}
|
|
34
34
|
return res.value[0].id;
|
|
35
35
|
});
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Retrieve the ID of a user by its email.
|
|
39
|
+
* @param mail User email.
|
|
40
|
+
*/
|
|
41
|
+
getUserIdByEmail(email) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
const requestOptions = {
|
|
44
|
+
url: `${graphResource}/v1.0/users?$filter=mail eq '${formatting_1.formatting.encodeQueryParameter(email)}'&$select=id`,
|
|
45
|
+
headers: {
|
|
46
|
+
accept: 'application/json;odata.metadata=none'
|
|
47
|
+
},
|
|
48
|
+
responseType: 'json'
|
|
49
|
+
};
|
|
50
|
+
const res = yield request_1.default.get(requestOptions);
|
|
51
|
+
if (res.value.length === 0) {
|
|
52
|
+
throw Error(`The specified user with email ${email} does not exist`);
|
|
53
|
+
}
|
|
54
|
+
return res.value[0].id;
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Retrieve the UPN of a user by its ID.
|
|
59
|
+
* @param id User ID.
|
|
60
|
+
*/
|
|
61
|
+
getUpnByUserId(id) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const requestOptions = {
|
|
64
|
+
url: `${graphResource}/v1.0/users/${id}?$select=userPrincipalName`,
|
|
65
|
+
headers: {
|
|
66
|
+
accept: 'application/json;odata.metadata=none'
|
|
67
|
+
},
|
|
68
|
+
responseType: 'json'
|
|
69
|
+
};
|
|
70
|
+
const res = yield request_1.default.get(requestOptions);
|
|
71
|
+
return res.userPrincipalName;
|
|
72
|
+
});
|
|
36
73
|
}
|
|
37
74
|
};
|
|
38
75
|
//# sourceMappingURL=aadUser.js.map
|
package/dist/utils/md.js
CHANGED
|
@@ -51,6 +51,12 @@ function convertContentTabs(md) {
|
|
|
51
51
|
return ` ${title}${os_1.EOL}${os_1.EOL}${content.replace(/^ /gms, '')}`;
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
+
function convertMdOutput(md) {
|
|
55
|
+
const regex = new RegExp('(?<=^ ```md)(.*)(?= ```)', 'gms');
|
|
56
|
+
return md.replace(regex, (match, content) => {
|
|
57
|
+
return content.replace(/^ /gms, '');
|
|
58
|
+
});
|
|
59
|
+
}
|
|
54
60
|
function convertCodeFences(md) {
|
|
55
61
|
const regex = new RegExp('^```.*?(?:\r\n|\n)(.*?)```(?:\r\n|\n)', 'gms');
|
|
56
62
|
return md.replace(regex, (match, code) => {
|
|
@@ -79,6 +85,7 @@ const convertFunctions = [
|
|
|
79
85
|
convertAdmonitions,
|
|
80
86
|
convertDd,
|
|
81
87
|
convertHyperlinks,
|
|
88
|
+
convertMdOutput,
|
|
82
89
|
convertContentTabs,
|
|
83
90
|
convertCodeFences,
|
|
84
91
|
removeInlineMarkup,
|
package/dist/utils/spo.js
CHANGED
|
@@ -536,6 +536,38 @@ exports.spo = {
|
|
|
536
536
|
const customActionOnSite = yield getById(webUrl, id, "Site");
|
|
537
537
|
return customActionOnSite;
|
|
538
538
|
});
|
|
539
|
+
},
|
|
540
|
+
getTenantAppCatalogUrl(logger, debug) {
|
|
541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
542
|
+
const spoUrl = yield exports.spo.getSpoUrl(logger, debug);
|
|
543
|
+
const requestOptions = {
|
|
544
|
+
url: `${spoUrl}/_api/SP_TenantSettings_Current`,
|
|
545
|
+
headers: {
|
|
546
|
+
accept: 'application/json;odata=nometadata'
|
|
547
|
+
},
|
|
548
|
+
responseType: 'json'
|
|
549
|
+
};
|
|
550
|
+
const result = yield request_1.default.get(requestOptions);
|
|
551
|
+
return result.CorporateCatalogUrl;
|
|
552
|
+
});
|
|
553
|
+
},
|
|
554
|
+
/**
|
|
555
|
+
* Retrieves the Azure AD ID from a SP user.
|
|
556
|
+
* @param webUrl Web url
|
|
557
|
+
* @param id The Id of the user
|
|
558
|
+
*/
|
|
559
|
+
getUserAzureIdBySpoId(webUrl, id) {
|
|
560
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
561
|
+
const requestOptions = {
|
|
562
|
+
url: `${webUrl}/_api/web/siteusers/GetById('${formatting_1.formatting.encodeQueryParameter(id)}')?$select=AadObjectId`,
|
|
563
|
+
headers: {
|
|
564
|
+
accept: 'application/json;odata=nometadata'
|
|
565
|
+
},
|
|
566
|
+
responseType: 'json'
|
|
567
|
+
};
|
|
568
|
+
const res = yield request_1.default.get(requestOptions);
|
|
569
|
+
return res.AadObjectId.NameId;
|
|
570
|
+
});
|
|
539
571
|
}
|
|
540
572
|
};
|
|
541
573
|
//# sourceMappingURL=spo.js.map
|
|
@@ -77,7 +77,7 @@ If you don't use the manifest, you must specify the name of the Azure AD app reg
|
|
|
77
77
|
|
|
78
78
|
You can also use the manifest to provision some of the configuration settings of your Azure AD app. All properties specified in the manifest are optional and will set if specified.
|
|
79
79
|
|
|
80
|
-
If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be
|
|
80
|
+
If you specify the manifest along with some options, values specified in the options will override settings from the manifest. One exception is the name specified in the `name` option which will be overridden by the `displayName` property from the manifest if specified.
|
|
81
81
|
|
|
82
82
|
The following properties specified in the manifest retrieved from Azure AD are not supported by this command:
|
|
83
83
|
|
|
@@ -137,7 +137,7 @@ Create new Azure AD app registration with an auto-generated secret (secret retur
|
|
|
137
137
|
m365 aad app add --name 'My AAD app' --withSecret
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
Create new Azure AD app registration for a
|
|
140
|
+
Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions
|
|
141
141
|
|
|
142
142
|
```sh
|
|
143
143
|
m365 aad app add --name 'My AAD app' --withSecret --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All,https://graph.microsoft.com/Directory.Read.All'
|
|
@@ -161,7 +161,7 @@ Create new Azure AD app registration with Application ID URI set to a value that
|
|
|
161
161
|
m365 aad app add --name 'My AAD app' --uri api://caf406b91cd4.ngrok.io/_appId_ --scopeName access_as_user --scopeAdminConsentDescription 'Access as a user' --scopeAdminConsentDisplayName 'Access as a user' --scopeConsentBy adminsAndUsers
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
Create new Azure AD app registration for a
|
|
164
|
+
Create new Azure AD app registration for a daemon app with specified Microsoft Graph application permissions, including admin consent
|
|
165
165
|
|
|
166
166
|
```sh
|
|
167
167
|
m365 aad app add --name 'My AAD app' --apisApplication 'https://graph.microsoft.com/Group.ReadWrite.All' --grantAdminConsent
|
|
@@ -20,10 +20,10 @@ m365 aad approleassignment add [options]
|
|
|
20
20
|
: Application name of the App Registration to which the configured scopes (app roles) should be applied
|
|
21
21
|
|
|
22
22
|
`-r, --resource <resource>`
|
|
23
|
-
: Service principal name, appId or objectId that has the scopes (roles)
|
|
23
|
+
: Service principal name, appId or objectId that has the scopes (roles) e.g. `SharePoint`.
|
|
24
24
|
|
|
25
25
|
`-s, --scope <scope>`
|
|
26
|
-
: Permissions known also as scopes and roles to grant the application with. If multiple permissions have to be granted, they have to be comma
|
|
26
|
+
: Permissions known also as scopes and roles to grant the application with. If multiple permissions have to be granted, they have to be comma-separated e.g. `Sites.Read.All,Sites.ReadWrite.all`
|
|
27
27
|
|
|
28
28
|
--8<-- "docs/cmd/_global.md"
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ This command requires tenant administrator permissions.
|
|
|
33
33
|
|
|
34
34
|
Specify either the `appId`, `appObjectId` or `appDisplayName` but not multiple. If you specify more than one option value, the command will fail with an error.
|
|
35
35
|
|
|
36
|
-
Autocomplete values for the `resource` option do not mean allowed values. The autocomplete will just suggest some known names, but that doesn't restrict you to use name of your own custom application or other application within your tenant.
|
|
36
|
+
Autocomplete values for the `resource` option do not mean allowed values. The autocomplete will just suggest some known names, but that doesn't restrict you to use the name of your own custom application or other application within your tenant.
|
|
37
37
|
|
|
38
38
|
This command can also be used to assign permissions to system or user-assigned managed identity.
|
|
39
39
|
|
|
@@ -45,13 +45,13 @@ Adds SharePoint _Sites.Read.All_ application permissions to Azure AD application
|
|
|
45
45
|
m365 aad approleassignment add --appId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "SharePoint" --scope "Sites.Read.All"
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Adds multiple Microsoft Graph application permissions to an Azure AD application with name
|
|
48
|
+
Adds multiple Microsoft Graph application permissions to an Azure AD application with the name _MyAppName__
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
51
|
m365 aad approleassignment add --appDisplayName "MyAppName" --resource "Microsoft Graph" --scope "Mail.Read,Mail.Send"
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Adds Microsoft Graph _Mail.Read_ application permissions to a system
|
|
54
|
+
Adds Microsoft Graph _Mail.Read_ application permissions to a system-managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
57
|
m365 aad approleassignment add --appObjectId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "Microsoft Graph" --scope "Mail.Read"
|
|
@@ -20,10 +20,10 @@ m365 aad approleassignment remove [options]
|
|
|
20
20
|
: Application name of the App Registration for which the configured scopes (app roles) should be deleted
|
|
21
21
|
|
|
22
22
|
`-r, --resource <resource>`
|
|
23
|
-
: Service principal name, appId or objectId that has the scopes (roles)
|
|
23
|
+
: Service principal name, appId or objectId that has the scopes (roles) e.g. `SharePoint`
|
|
24
24
|
|
|
25
25
|
`-s, --scope <scope>`
|
|
26
|
-
: Permissions known also as scopes and roles to be deleted from the application. If multiple permissions have to be deleted, they have to be comma
|
|
26
|
+
: Permissions known also as scopes and roles to be deleted from the application. If multiple permissions have to be deleted, they have to be comma-separated e.g. `Sites.Read.All`,`Sites.ReadWrite.All`
|
|
27
27
|
|
|
28
28
|
`--confirm`
|
|
29
29
|
: Don't prompt for confirming removing the all role assignment
|
|
@@ -54,7 +54,7 @@ Deletes multiple Microsoft Graph application permissions from an Azure AD applic
|
|
|
54
54
|
m365 aad approleassignment remove --appDisplayName "MyAppName" --resource "Microsoft Graph" --scope "Mail.Read,Mail.Send"
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
Deletes Microsoft Graph _Mail.Read_ application permissions from a system
|
|
57
|
+
Deletes Microsoft Graph _Mail.Read_ application permissions from a system-managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
|
|
58
58
|
|
|
59
59
|
```sh
|
|
60
60
|
m365 aad approleassignment remove --appObjectId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "Microsoft Graph" --scope "Mail.Read"
|
|
@@ -12,16 +12,16 @@ m365 cli completion clink update [options]
|
|
|
12
12
|
|
|
13
13
|
--8<-- "docs/cmd/_global.md"
|
|
14
14
|
|
|
15
|
-
!!! important
|
|
16
|
-
Before running this command, change the working directory to where your shell stores completion plugins. For cmder, it's `%CMDER_ROOT%\vendor\clink-completions`, where `%CMDER_ROOT%` is the folder where you installed cmder. After running this command, restart your terminal to load the completion.
|
|
17
|
-
|
|
18
15
|
## Remarks
|
|
19
16
|
|
|
20
17
|
This commands updates the list of commands and their options used by command completion in Clink (cmder). You should run this command each time after upgrading the CLI for Microsoft 365.
|
|
21
18
|
|
|
19
|
+
!!! important
|
|
20
|
+
Before running this command, change the working directory to where your shell stores completion plugins. For cmder, it's `%CMDER_ROOT%\vendor\clink-completions`, where `%CMDER_ROOT%` is the folder where you installed cmder. After running this command, restart your terminal to load the completion.
|
|
21
|
+
|
|
22
22
|
## Examples
|
|
23
23
|
|
|
24
|
-
Write the list of commands for Clink (cmder) command completion to a file named `m365.lua` in the current directory
|
|
24
|
+
Write the list of commands for Clink (cmder) command completion to a file named `m365.lua` in the current directory.
|
|
25
25
|
|
|
26
26
|
```powershell
|
|
27
27
|
m365 cli completion clink update > m365.lua
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# flow owner ensure
|
|
2
|
+
|
|
3
|
+
Assigns/updates permissions to a Power Automate flow
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 flow owner ensure [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environmentName <environmentName>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-f, --flowName <flowName>`
|
|
17
|
+
: The name of the Power Automate flow.
|
|
18
|
+
|
|
19
|
+
`--userId [userId]`
|
|
20
|
+
: The ID of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
21
|
+
|
|
22
|
+
`--userName [userName]`
|
|
23
|
+
: User principal name of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
24
|
+
|
|
25
|
+
`--groupId [groupId]`
|
|
26
|
+
: The ID of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
27
|
+
|
|
28
|
+
`--groupName [groupName]`
|
|
29
|
+
: The name of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
30
|
+
|
|
31
|
+
`--roleName <roleName>`
|
|
32
|
+
: Access level for the user on the flow. Valid options are `CanView` or `CanEdit`.
|
|
33
|
+
|
|
34
|
+
`--asAdmin`
|
|
35
|
+
: Run the command as admin.
|
|
36
|
+
|
|
37
|
+
--8<-- "docs/cmd/_global.md"
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Assign owner permissions to a specific Power Automate flow for a user with ID
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 flow owner ensure --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Assign owner permissions to a specific Power Automate flow for a user with UPN
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 flow owner ensure --userName "john.doe@contoso.com" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Assign owner permissions to a specific Power Automate flow for a group
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 flow owner ensure --groupId 8d4d9f32-1ab0-4f81-9054-efbb1759e8e6 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Response
|
|
60
|
+
|
|
61
|
+
The command won't return a response on success.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# flow owner list
|
|
2
|
+
|
|
3
|
+
Lists all owners of a Power Automate flow
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 flow owner list [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environmentName <environmentName>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-f, --flowName <flowName>`
|
|
17
|
+
: The name of the Power Automate flow.
|
|
18
|
+
|
|
19
|
+
`--asAdmin`
|
|
20
|
+
: Run the command as admin.
|
|
21
|
+
|
|
22
|
+
--8<-- "docs/cmd/_global.md"
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
Gets the owners by the name of the Power Automate flow within a specified environment
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 flow owner list --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Gets the owners by the name of the Power Automate flow within a specified environment with admin privileges
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
m365 flow owner list --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --asAdmin
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Response
|
|
39
|
+
|
|
40
|
+
=== "JSON"
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
[
|
|
44
|
+
{
|
|
45
|
+
"name": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
|
|
46
|
+
"id": "/providers/Microsoft.ProcessSimple/environments/Default-c5a5d746-3520-453f-8a69-780f8e44917e/flows/72f2be4a-78c1-4220-a048-dbf557296a72/permissions/fe36f75e-c103-410b-a18a-2bf6df06ac3a",
|
|
47
|
+
"type": "/providers/Microsoft.ProcessSimple/environments/flows/permissions",
|
|
48
|
+
"properties": {
|
|
49
|
+
"roleName": "Owner",
|
|
50
|
+
"permissionType": "Principal",
|
|
51
|
+
"principal": {
|
|
52
|
+
"id": "fe36f75e-c103-410b-a18a-2bf6df06ac3a",
|
|
53
|
+
"type": "User"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
=== "Text"
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
roleName id type
|
|
64
|
+
-------- ------------------------------------ ----
|
|
65
|
+
Owner fe36f75e-c103-410b-a18a-2bf6df06ac3a User
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
=== "CSV"
|
|
69
|
+
|
|
70
|
+
```csv
|
|
71
|
+
roleName,id,type
|
|
72
|
+
Owner,fe36f75e-c103-410b-a18a-2bf6df06ac3a,User
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
=== "Markdown"
|
|
76
|
+
|
|
77
|
+
```md
|
|
78
|
+
# flow owner list --environmentName "Default-c5a5d746-3520-453f-8a69-780f8e44917e" --flowName "72f2be4a-78c1-4220-a048-dbf557296a72"
|
|
79
|
+
|
|
80
|
+
Date: 25/02/2023
|
|
81
|
+
|
|
82
|
+
## fe36f75e-c103-410b-a18a-2bf6df06ac3a (/providers/Microsoft.ProcessSimple/environments/Default-c5a5d746-3520-453f-8a69-780f8e44917e/flows/72f2be4a-78c1-4220-a048-dbf557296a72/permissions/fe36f75e-c103-410b-a18a-2bf6df06ac3a)
|
|
83
|
+
|
|
84
|
+
Property | Value
|
|
85
|
+
---------|-------
|
|
86
|
+
name | fe36f75e-c103-410b-a18a-2bf6df06ac3a
|
|
87
|
+
id | /providers/Microsoft.ProcessSimple/environments/Default-c5a5d746-3520-453f-8a69-780f8e44917e/flows/72f2be4a-78c1-4220-a048-dbf557296a72/permissions/fe36f75e-c103-410b-a18a-2bf6df06ac3a
|
|
88
|
+
type | /providers/Microsoft.ProcessSimple/environments/flows/permissions
|
|
89
|
+
properties | {"roleName":"Owner","permissionType":"Principal","principal":{"id":"fe36f75e-c103-410b-a18a-2bf6df06ac3a","type":"User"}}
|
|
90
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# flow owner remove
|
|
2
|
+
|
|
3
|
+
Removes owner permissions to a Power Automate flow
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
m365 flow owner remove [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Options
|
|
12
|
+
|
|
13
|
+
`-e, --environmentName <environmentName>`
|
|
14
|
+
: The name of the environment.
|
|
15
|
+
|
|
16
|
+
`-f, --flowName <flowName>`
|
|
17
|
+
: The name of the Power Automate flow.
|
|
18
|
+
|
|
19
|
+
`--userId [userId]`
|
|
20
|
+
: The ID of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
21
|
+
|
|
22
|
+
`--userName [userName]`
|
|
23
|
+
: User principal name of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
24
|
+
|
|
25
|
+
`--groupId [groupId]`
|
|
26
|
+
: The ID of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
27
|
+
|
|
28
|
+
`--groupName [groupName]`
|
|
29
|
+
: The name of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
|
|
30
|
+
|
|
31
|
+
`--asAdmin`
|
|
32
|
+
: Run the command as admin.
|
|
33
|
+
|
|
34
|
+
`--confirm`
|
|
35
|
+
: Don't prompt for confirmation.
|
|
36
|
+
|
|
37
|
+
--8<-- "docs/cmd/_global.md"
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
Remove owner permissions from a specific Power Automate flow for a user by ID without prompting for confirmation
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 flow owner remove --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --confirm
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Remove owner permissions from a specific Power Automate flow for a user by UPN as admin
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 flow owner remove --userName john.doe@contoso.com --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --asAdmin
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Remove owner permissions from a specific Power Automate flow for a group by ID
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 flow owner remove --groupId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Remove owner permissions from a specific Power Automate flow for a group by name as admin
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
m365 flow owner remove --groupName "Test group" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --asAdmin
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Response
|
|
66
|
+
|
|
67
|
+
The command won't return a response on success.
|
|
@@ -25,6 +25,9 @@ m365 flow run list [options]
|
|
|
25
25
|
`--triggerEndTime [triggerEndTime]`
|
|
26
26
|
: Time indicating the exclusive end of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).
|
|
27
27
|
|
|
28
|
+
`--asAdmin`
|
|
29
|
+
: Run the command as admin. Use this flag when targeting flows you don't own.
|
|
30
|
+
|
|
28
31
|
--8<-- "docs/cmd/_global.md"
|
|
29
32
|
|
|
30
33
|
## Remarks
|
|
@@ -56,6 +59,12 @@ List runs of the specified Microsoft Flow between a specific time range
|
|
|
56
59
|
m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --triggerStartTime 2023-01-21T18:19:00Z --triggerEndTime 2023-01-22T00:00:00Z
|
|
57
60
|
```
|
|
58
61
|
|
|
62
|
+
List runs of the specified Microsoft Flow owned by another user
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --asAdmin
|
|
66
|
+
```
|
|
67
|
+
|
|
59
68
|
## Response
|
|
60
69
|
|
|
61
70
|
### Standard response
|
|
@@ -123,3 +132,22 @@ m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c
|
|
|
123
132
|
name,startTime,status
|
|
124
133
|
08585329112602833828909892130CU17,2022-11-17T14:33:45.2763872Z,Running
|
|
125
134
|
```
|
|
135
|
+
|
|
136
|
+
=== "Markdown"
|
|
137
|
+
|
|
138
|
+
```md
|
|
139
|
+
# flow run list --environmentName "Default-de348bc7-1aeb-4406-8cb3-97db021cadb4" --flowName "08585329112602833828909892130CU17"
|
|
140
|
+
|
|
141
|
+
Date: 1/3/2023
|
|
142
|
+
|
|
143
|
+
## 08585329112602833828909892130CU17 (/providers/Microsoft.ProcessSimple/environments/Default-de348bc7-1aeb-4406-8cb3-97db021cadb4/flows/170fb67e-a514-4d84-8727-582022bd13a9/runs/08585329112602833828909892130CU17)
|
|
144
|
+
|
|
145
|
+
Property | Value
|
|
146
|
+
---------|-------
|
|
147
|
+
name | 08585329112602833828909892130CU17
|
|
148
|
+
id | /providers/Microsoft.ProcessSimple/environments/Default-de348bc7-1aeb-4406-8cb3-97db021cadb4/flows/170fb67e-a514-4d84-8727-582022bd13a9/runs/08585329112602833828909892130CU17
|
|
149
|
+
type | Microsoft.ProcessSimple/environments/flows/runs
|
|
150
|
+
properties | {"startTime":"2022-11-17T14:33:45.2763872Z","status":"Running","correlation":{"clientTrackingId":"08585329112602833829909892130CU00"},"trigger":{"name":"When_a_new_response_is_submitted","inputsLink":{"uri":"https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerInputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=jmdMRWvY7uGoxTmqd3_a2bJtegXuVyuKTKKUVLiwh38","contentVersion":"6ZrBBE+MJg7IvhMgyJLMmA==","contentSize":349,"contentHash":{"algorithm":"md5","value":"6ZrBBE+MJg7IvhMgyJLMmA=="}},"outputsLink":{"uri":"https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerOutputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=Y3qqjuWrrcQJrmF7uvm6LVzQy5w-dNOFWJ8Yt8khXvA","contentVersion":"Z/4a8tfYygNAR1xpc44iww==","contentSize":493,"contentHash":{"algorithm":"md5","value":"Z/4a8tfYygNAR1xpc44iww=="}},"startTime":"2022-11-17T14:33:45.1914506Z","endTime":"2022-11-17T14:33:45.1914506Z","originHistoryName":"08585329112602833829909892130CU00","correlation":{"clientTrackingId":"08585329112602833829909892130CU00"},"status":"Succeeded"}}
|
|
151
|
+
startTime | 2022-11-17T14:33:45.2763872Z
|
|
152
|
+
status | Running
|
|
153
|
+
```
|
|
@@ -118,7 +118,7 @@ m365 onenote page list --webUrl https://contoso.sharepoint.com/sites/testsite
|
|
|
118
118
|
=== "Markdown"
|
|
119
119
|
|
|
120
120
|
```md
|
|
121
|
-
# onenote page list --userName "
|
|
121
|
+
# onenote page list --userName "john.doe@contoso.onmicrosoft.com"
|
|
122
122
|
|
|
123
123
|
Date: 07/01/2023
|
|
124
124
|
|
|
@@ -11,7 +11,7 @@ m365 outlook mail send [options]
|
|
|
11
11
|
## Options
|
|
12
12
|
|
|
13
13
|
`-s, --subject <subject>`
|
|
14
|
-
: Email subject
|
|
14
|
+
: Email subject.
|
|
15
15
|
|
|
16
16
|
`-t, --to <to>`
|
|
17
17
|
: Comma-separated list of emails to send the message to.
|
|
@@ -32,10 +32,10 @@ m365 outlook mail send [options]
|
|
|
32
32
|
: String containing the body of the email to send.
|
|
33
33
|
|
|
34
34
|
`--bodyContentType [bodyContentType]`
|
|
35
|
-
: Type of the body content. Available options: `Text
|
|
35
|
+
: Type of the body content. Available options: `Text`, `HTML`. Default is `Text`.
|
|
36
36
|
|
|
37
37
|
`--importance [importance]`
|
|
38
|
-
: The importance of the message. Available options: `low`, `normal
|
|
38
|
+
: The importance of the message. Available options: `low`, `normal`, or `high`. Default is `normal`.
|
|
39
39
|
|
|
40
40
|
`--attachment [attachment]`
|
|
41
41
|
: Path to the file that will be added as attachment to the email. This option can be used multiple times to attach multiple attachments.
|
|
@@ -123,3 +123,7 @@ Send an email with multiple attachments
|
|
|
123
123
|
```sh
|
|
124
124
|
m365 outlook mail send --to chris@contoso.com --subject "Monthly reports" --bodyContents "Here are the reports of this month." --attachment "C:/Reports/File1.jpg" --attachment "C:/Reports/File2.docx" --attachment "C:/Reports/File3.xlsx"
|
|
125
125
|
```
|
|
126
|
+
|
|
127
|
+
## Response
|
|
128
|
+
|
|
129
|
+
The command won't return a response on success.
|