@pnp/cli-microsoft365 7.5.0-beta.d4d820f → 7.5.0
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 +2 -2
- package/.eslintrc.cjs +6 -2
- package/.mocharc.json +3 -5
- package/Dockerfile +2 -5
- package/README.md +2 -2
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +171 -69
- package/dist/AuthServer.js +3 -3
- package/dist/Command.js +8 -5
- package/dist/auth/FileTokenStorage.js +4 -1
- package/dist/m365/base/AppCommand.js +2 -2
- package/dist/m365/base/PowerAppsCommand.js +2 -2
- package/dist/m365/base/PowerAutomateCommand.js +2 -2
- package/dist/m365/base/PowerPlatformCommand.js +2 -2
- package/dist/m365/base/SpoCommand.js +3 -3
- package/dist/m365/base/{YammerCommand.js → VivaEngageCommand.js} +2 -2
- package/dist/m365/cli/commands/cli-consent.js +5 -3
- package/dist/m365/cli/commands/cli-doctor.js +5 -5
- package/dist/m365/commands/ConnectionDetails.js +2 -0
- package/dist/m365/commands/login.js +26 -48
- package/dist/m365/commands/logout.js +2 -2
- package/dist/m365/commands/request.js +2 -2
- package/dist/m365/commands/status.js +15 -23
- package/dist/m365/connection/commands/connection-list.js +47 -0
- package/dist/m365/connection/commands/connection-remove.js +67 -0
- package/dist/m365/connection/commands/connection-set.js +56 -0
- package/dist/m365/connection/commands/connection-use.js +51 -0
- package/dist/m365/connection/commands.js +8 -0
- package/dist/m365/entra/aadCommands.js +3 -0
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +153 -0
- package/dist/m365/entra/commands/app/app-add.js +2 -2
- package/dist/m365/entra/commands/app/app-get.js +1 -1
- package/dist/m365/entra/commands/app/app-list.js +1 -1
- package/dist/m365/entra/commands/app/app-permission-add.js +1 -1
- package/dist/m365/entra/commands/app/app-permission-list.js +182 -0
- package/dist/m365/entra/commands/app/app-remove.js +1 -1
- package/dist/m365/entra/commands/app/app-role-add.js +1 -1
- package/dist/m365/entra/commands/app/app-role-list.js +1 -1
- package/dist/m365/entra/commands/app/app-role-remove.js +1 -1
- package/dist/m365/entra/commands/app/app-set.js +1 -1
- package/dist/m365/entra/commands/{sp/sp-add.js → enterpriseapp/enterpriseapp-add.js} +18 -18
- package/dist/m365/entra/commands/{sp/sp-get.js → enterpriseapp/enterpriseapp-get.js} +19 -19
- package/dist/m365/entra/commands/{sp/sp-list.js → enterpriseapp/enterpriseapp-list.js} +13 -13
- package/dist/m365/entra/commands/group/group-add.js +224 -0
- package/dist/m365/entra/commands/group/group-user-add.js +145 -0
- package/dist/m365/entra/commands/m365group/m365group-report-activitygroupcounts.js +1 -1
- package/dist/m365/entra/commands/user/user-get.js +38 -38
- package/dist/m365/entra/commands/user/user-license-list.js +1 -1
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +224 -0
- package/dist/m365/entra/commands/user/user-set.js +2 -2
- package/dist/m365/entra/commands.js +17 -0
- package/dist/m365/external/commands/connection/connection-doctor.js +2 -1
- package/dist/m365/file/commands/convert/convert-pdf.js +1 -1
- package/dist/m365/file/commands/file-copy.js +151 -0
- package/dist/m365/file/commands.js +1 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +1 -1
- package/dist/m365/outlook/commands/message/message-get.js +1 -1
- package/dist/m365/pa/commands/app/app-permission-ensure.js +1 -1
- package/dist/m365/pa/commands/app/app-permission-remove.js +1 -1
- package/dist/m365/planner/commands/roster/roster-plan-list.js +1 -1
- package/dist/m365/purview/commands/auditlog/auditlog-list.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-get.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-list.js +1 -1
- package/dist/m365/purview/commands/sensitivitylabel/sensitivitylabel-policysettings-list.js +1 -1
- package/dist/m365/spfx/commands/project/DeployWorkflow.js +4 -3
- package/dist/m365/spo/commands/spo-get.js +1 -1
- package/dist/m365/spo/commands/spo-search.js +52 -22
- package/dist/m365/spo/commands/spo-set.js +1 -1
- package/dist/m365/teams/commands/chat/chat-get.js +1 -1
- package/dist/m365/teams/commands/chat/chat-list.js +1 -1
- package/dist/m365/teams/commands/chat/chat-message-send.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-add.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-attendancereport-list.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-get.js +1 -1
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -2
- package/dist/m365/teams/commands/meeting/meeting-transcript-list.js +1 -1
- package/dist/m365/tenant/commands/id/id-get.js +1 -1
- package/dist/m365/tenant/commands/info/info-get.js +1 -1
- package/dist/m365/util/commands/accesstoken/accesstoken-get.js +3 -3
- package/dist/m365/{yammer/commands/group/group-list.js → viva/commands/engage/engage-group-list.js} +19 -14
- package/dist/m365/{yammer/commands/group/group-user-add.js → viva/commands/engage/engage-group-user-add.js} +19 -14
- package/dist/m365/{yammer/commands/group/group-user-remove.js → viva/commands/engage/engage-group-user-remove.js} +19 -14
- package/dist/m365/{yammer/commands/message/message-add.js → viva/commands/engage/engage-message-add.js} +19 -14
- package/dist/m365/{yammer/commands/message/message-get.js → viva/commands/engage/engage-message-get.js} +17 -12
- package/dist/m365/{yammer/commands/message/message-like-set.js → viva/commands/engage/engage-message-like-set.js} +21 -16
- package/dist/m365/{yammer/commands/message/message-list.js → viva/commands/engage/engage-message-list.js} +21 -16
- package/dist/m365/{yammer/commands/message/message-remove.js → viva/commands/engage/engage-message-remove.js} +20 -15
- package/dist/m365/{yammer/commands/network/network-list.js → viva/commands/engage/engage-network-list.js} +16 -11
- package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +23 -0
- package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +23 -0
- package/dist/m365/{yammer/commands/yammer-search.js → viva/commands/engage/engage-search.js} +23 -18
- package/dist/m365/{yammer/commands/user/user-get.js → viva/commands/engage/engage-user-get.js} +18 -13
- package/dist/m365/{yammer/commands/user/user-list.js → viva/commands/engage/engage-user-list.js} +18 -13
- package/dist/m365/{yammer/commands.js → viva/commands/engage/yammerCommands.js} +1 -1
- package/dist/m365/viva/commands.js +22 -1
- package/dist/request.js +1 -1
- package/dist/utils/entraUser.js +36 -0
- package/dist/utils/spo.js +36 -14
- package/dist/utils/urlUtil.js +31 -0
- package/dist/utils/validation.js +8 -0
- package/docs/docs/cmd/cli/cli-consent.mdx +9 -9
- package/docs/docs/cmd/connection/connection-list.mdx +100 -0
- package/docs/docs/cmd/connection/connection-remove.mdx +45 -0
- package/docs/docs/cmd/connection/connection-set.mdx +39 -0
- package/docs/docs/cmd/connection/connection-use.mdx +98 -0
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-add.mdx +5 -3
- package/docs/docs/cmd/entra/administrativeunit/administrativeunit-member-remove.mdx +107 -0
- package/docs/docs/cmd/entra/app/app-add.mdx +2 -1
- package/docs/docs/cmd/entra/app/app-get.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-list.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-permission-add.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-permission-list.mdx +105 -0
- package/docs/docs/cmd/entra/app/app-remove.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-add.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-list.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-role-remove.mdx +1 -0
- package/docs/docs/cmd/entra/app/app-set.mdx +1 -0
- package/docs/docs/cmd/entra/{sp/sp-add.mdx → enterpriseapp/enterpriseapp-add.mdx} +16 -15
- package/docs/docs/cmd/entra/{sp/sp-get.mdx → enterpriseapp/enterpriseapp-get.mdx} +15 -14
- package/docs/docs/cmd/entra/{sp/sp-list.mdx → enterpriseapp/enterpriseapp-list.mdx} +22 -21
- package/docs/docs/cmd/entra/group/group-add.mdx +231 -0
- package/docs/docs/cmd/entra/group/group-user-add.mdx +62 -0
- package/docs/docs/cmd/entra/m365group/m365group-report-activitygroupcounts.mdx +1 -1
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +3 -3
- package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
- package/docs/docs/cmd/entra/user/user-registrationdetails-list.mdx +246 -0
- package/docs/docs/cmd/external/item/item-add.mdx +1 -1
- package/docs/docs/cmd/file/convert/convert-pdf.mdx +4 -0
- package/docs/docs/cmd/file/file-add.mdx +4 -0
- package/docs/docs/cmd/file/file-copy.mdx +68 -0
- package/docs/docs/cmd/file/file-list.mdx +100 -0
- package/docs/docs/cmd/login.mdx +15 -0
- package/docs/docs/cmd/setup.mdx +4 -0
- package/docs/docs/cmd/spo/list/list-webhook-set.mdx +1 -1
- package/docs/docs/cmd/spo/spo-search.mdx +6 -2
- package/docs/docs/cmd/spo/theme/theme-set.mdx +14 -2
- package/docs/docs/cmd/{yammer/group/group-list.mdx → viva/engage/engage-group-list.mdx} +13 -13
- package/docs/docs/cmd/{yammer/group/group-user-add.mdx → viva/engage/engage-group-user-add.mdx} +7 -7
- package/docs/docs/cmd/{yammer/group/group-user-remove.mdx → viva/engage/engage-group-user-remove.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-add.mdx → viva/engage/engage-message-add.mdx} +12 -13
- package/docs/docs/cmd/{yammer/message/message-get.mdx → viva/engage/engage-message-get.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-like-set.mdx → viva/engage/engage-message-like-set.mdx} +10 -10
- package/docs/docs/cmd/{yammer/message/message-list.mdx → viva/engage/engage-message-list.mdx} +21 -21
- package/docs/docs/cmd/{yammer/message/message-remove.mdx → viva/engage/engage-message-remove.mdx} +10 -10
- package/docs/docs/cmd/{yammer/network/network-list.mdx → viva/engage/engage-network-list.mdx} +6 -6
- package/docs/docs/cmd/{yammer/report/report-activitycounts.mdx → viva/engage/engage-report-activitycounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-activityusercounts.mdx → viva/engage/engage-report-activityusercounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-activityuserdetail.mdx → viva/engage/engage-report-activityuserdetail.mdx} +11 -12
- package/docs/docs/cmd/{yammer/report/report-deviceusagedistributionusercounts.mdx → viva/engage/engage-report-deviceusagedistributionusercounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/report/report-deviceusageusercounts.mdx → viva/engage/engage-report-deviceusageusercounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/report/report-deviceusageuserdetail.mdx → viva/engage/engage-report-deviceusageuserdetail.mdx} +11 -11
- package/docs/docs/cmd/{yammer/report/report-groupsactivitycounts.mdx → viva/engage/engage-report-groupsactivitycounts.mdx} +9 -9
- package/docs/docs/cmd/{yammer/report/report-groupsactivitydetail.mdx → viva/engage/engage-report-groupsactivitydetail.mdx} +11 -11
- package/docs/docs/cmd/{yammer/report/report-groupsactivitygroupcounts.mdx → viva/engage/engage-report-groupsactivitygroupcounts.mdx} +5 -5
- package/docs/docs/cmd/{yammer/yammer-search.mdx → viva/engage/engage-search.mdx} +10 -10
- package/docs/docs/cmd/{yammer/user/user-get.mdx → viva/engage/engage-user-get.mdx} +8 -8
- package/docs/docs/cmd/{yammer/user/user-list.mdx → viva/engage/engage-user-list.mdx} +11 -11
- package/npm-shrinkwrap.json +228 -166
- package/package.json +21 -20
- package/dist/m365/base/AzmgmtCommand.js +0 -18
- package/dist/m365/base/AzmgmtItemsListCommand.js +0 -41
- package/dist/m365/yammer/commands/report/report-activitycounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-activityusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-activityuserdetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusagedistributionusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusageusercounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-deviceusageuserdetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitycounts.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitydetail.js +0 -15
- package/dist/m365/yammer/commands/report/report-groupsactivitygroupcounts.js +0 -15
package/dist/m365/{yammer/commands/yammer-search.js → viva/commands/engage/engage-search.js}
RENAMED
|
@@ -3,22 +3,26 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
7
|
-
import { cli } from '
|
|
8
|
-
import request from '
|
|
9
|
-
import { formatting } from '
|
|
10
|
-
import
|
|
11
|
-
import commands from '
|
|
12
|
-
|
|
6
|
+
var _VivaEngageSearchCommand_instances, _a, _VivaEngageSearchCommand_initTelemetry, _VivaEngageSearchCommand_initOptions, _VivaEngageSearchCommand_initValidators;
|
|
7
|
+
import { cli } from '../../../../cli/cli.js';
|
|
8
|
+
import request from '../../../../request.js';
|
|
9
|
+
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
11
|
+
import commands from '../../commands.js';
|
|
12
|
+
import yammerCommands from './yammerCommands.js';
|
|
13
|
+
class VivaEngageSearchCommand extends VivaEngageCommand {
|
|
13
14
|
get name() {
|
|
14
|
-
return commands.
|
|
15
|
+
return commands.ENGAGE_SEARCH;
|
|
15
16
|
}
|
|
16
17
|
get description() {
|
|
17
18
|
return 'Returns a list of messages, users, topics and groups that match the specified query.';
|
|
18
19
|
}
|
|
20
|
+
alias() {
|
|
21
|
+
return [yammerCommands.SEARCH];
|
|
22
|
+
}
|
|
19
23
|
constructor() {
|
|
20
24
|
super();
|
|
21
|
-
|
|
25
|
+
_VivaEngageSearchCommand_instances.add(this);
|
|
22
26
|
this.summary = {
|
|
23
27
|
messages: 0,
|
|
24
28
|
groups: 0,
|
|
@@ -29,9 +33,9 @@ class YammerSearchCommand extends YammerCommand {
|
|
|
29
33
|
this.groups = [];
|
|
30
34
|
this.topics = [];
|
|
31
35
|
this.users = [];
|
|
32
|
-
__classPrivateFieldGet(this,
|
|
33
|
-
__classPrivateFieldGet(this,
|
|
34
|
-
__classPrivateFieldGet(this,
|
|
36
|
+
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initTelemetry).call(this);
|
|
37
|
+
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initOptions).call(this);
|
|
38
|
+
__classPrivateFieldGet(this, _VivaEngageSearchCommand_instances, "m", _VivaEngageSearchCommand_initValidators).call(this);
|
|
35
39
|
}
|
|
36
40
|
async getAllItems(logger, args, page) {
|
|
37
41
|
const endpoint = `${this.resource}/v1/search.json?search=${formatting.encodeQueryParameter(args.options.queryText)}&page=${page}`;
|
|
@@ -89,6 +93,7 @@ class YammerSearchCommand extends YammerCommand {
|
|
|
89
93
|
}
|
|
90
94
|
}
|
|
91
95
|
async commandAction(logger, args) {
|
|
96
|
+
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
92
97
|
this.summary = {
|
|
93
98
|
messages: 0,
|
|
94
99
|
groups: 0,
|
|
@@ -169,14 +174,14 @@ class YammerSearchCommand extends YammerCommand {
|
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
176
|
}
|
|
172
|
-
_a =
|
|
177
|
+
_a = VivaEngageSearchCommand, _VivaEngageSearchCommand_instances = new WeakSet(), _VivaEngageSearchCommand_initTelemetry = function _VivaEngageSearchCommand_initTelemetry() {
|
|
173
178
|
this.telemetry.push((args) => {
|
|
174
179
|
Object.assign(this.telemetryProperties, {
|
|
175
180
|
show: typeof args.options.show !== 'undefined',
|
|
176
181
|
limit: typeof args.options.limit !== 'undefined'
|
|
177
182
|
});
|
|
178
183
|
});
|
|
179
|
-
},
|
|
184
|
+
}, _VivaEngageSearchCommand_initOptions = function _VivaEngageSearchCommand_initOptions() {
|
|
180
185
|
this.options.unshift({
|
|
181
186
|
option: '--queryText <queryText>'
|
|
182
187
|
}, {
|
|
@@ -185,7 +190,7 @@ _a = YammerSearchCommand, _YammerSearchCommand_instances = new WeakSet(), _Yamme
|
|
|
185
190
|
}, {
|
|
186
191
|
option: '--limit [limit]'
|
|
187
192
|
});
|
|
188
|
-
},
|
|
193
|
+
}, _VivaEngageSearchCommand_initValidators = function _VivaEngageSearchCommand_initValidators() {
|
|
189
194
|
this.validators.push(async (args) => {
|
|
190
195
|
if (args.options.queryText && typeof args.options.queryText !== 'string') {
|
|
191
196
|
return `${args.options.queryText} is not a string`;
|
|
@@ -209,8 +214,8 @@ _a = YammerSearchCommand, _YammerSearchCommand_instances = new WeakSet(), _Yamme
|
|
|
209
214
|
return true;
|
|
210
215
|
});
|
|
211
216
|
};
|
|
212
|
-
|
|
217
|
+
VivaEngageSearchCommand.showOptions = [
|
|
213
218
|
'summary', 'messages', 'users', 'topics', 'groups'
|
|
214
219
|
];
|
|
215
|
-
export default new
|
|
216
|
-
//# sourceMappingURL=
|
|
220
|
+
export default new VivaEngageSearchCommand();
|
|
221
|
+
//# sourceMappingURL=engage-search.js.map
|
package/dist/m365/{yammer/commands/user/user-get.js → viva/commands/engage/engage-user-get.js}
RENAMED
|
@@ -3,29 +3,34 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _VivaEngageUserGetCommand_instances, _VivaEngageUserGetCommand_initTelemetry, _VivaEngageUserGetCommand_initOptions, _VivaEngageUserGetCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
8
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
-
import
|
|
9
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
10
10
|
import commands from '../../commands.js';
|
|
11
|
-
|
|
11
|
+
import yammerCommands from './yammerCommands.js';
|
|
12
|
+
class VivaEngageUserGetCommand extends VivaEngageCommand {
|
|
12
13
|
get name() {
|
|
13
|
-
return commands.
|
|
14
|
+
return commands.ENGAGE_USER_GET;
|
|
14
15
|
}
|
|
15
16
|
get description() {
|
|
16
17
|
return 'Retrieves the current user or searches for a user by ID or e-mail';
|
|
17
18
|
}
|
|
19
|
+
alias() {
|
|
20
|
+
return [yammerCommands.USER_GET];
|
|
21
|
+
}
|
|
18
22
|
defaultProperties() {
|
|
19
23
|
return ['id', 'full_name', 'email', 'job_title', 'state', 'url'];
|
|
20
24
|
}
|
|
21
25
|
constructor() {
|
|
22
26
|
super();
|
|
23
|
-
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
27
|
+
_VivaEngageUserGetCommand_instances.add(this);
|
|
28
|
+
__classPrivateFieldGet(this, _VivaEngageUserGetCommand_instances, "m", _VivaEngageUserGetCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _VivaEngageUserGetCommand_instances, "m", _VivaEngageUserGetCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _VivaEngageUserGetCommand_instances, "m", _VivaEngageUserGetCommand_initValidators).call(this);
|
|
27
31
|
}
|
|
28
32
|
async commandAction(logger, args) {
|
|
33
|
+
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
29
34
|
let endPoint = `${this.resource}/v1/users/current.json`;
|
|
30
35
|
if (args.options.id) {
|
|
31
36
|
endPoint = `${this.resource}/v1/users/${args.options.id}.json`;
|
|
@@ -50,20 +55,20 @@ class YammerUserGetCommand extends YammerCommand {
|
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
_VivaEngageUserGetCommand_instances = new WeakSet(), _VivaEngageUserGetCommand_initTelemetry = function _VivaEngageUserGetCommand_initTelemetry() {
|
|
54
59
|
this.telemetry.push((args) => {
|
|
55
60
|
Object.assign(this.telemetryProperties, {
|
|
56
61
|
userId: args.options.id !== undefined,
|
|
57
62
|
email: args.options.email !== undefined
|
|
58
63
|
});
|
|
59
64
|
});
|
|
60
|
-
},
|
|
65
|
+
}, _VivaEngageUserGetCommand_initOptions = function _VivaEngageUserGetCommand_initOptions() {
|
|
61
66
|
this.options.unshift({
|
|
62
67
|
option: '-i, --id [id]'
|
|
63
68
|
}, {
|
|
64
69
|
option: '--email [email]'
|
|
65
70
|
});
|
|
66
|
-
},
|
|
71
|
+
}, _VivaEngageUserGetCommand_initValidators = function _VivaEngageUserGetCommand_initValidators() {
|
|
67
72
|
this.validators.push(async (args) => {
|
|
68
73
|
if (args.options.id !== undefined && args.options.email !== undefined) {
|
|
69
74
|
return `You are only allowed to search by ID or e-mail but not both`;
|
|
@@ -71,5 +76,5 @@ _YammerUserGetCommand_instances = new WeakSet(), _YammerUserGetCommand_initTelem
|
|
|
71
76
|
return true;
|
|
72
77
|
});
|
|
73
78
|
};
|
|
74
|
-
export default new
|
|
75
|
-
//# sourceMappingURL=user-get.js.map
|
|
79
|
+
export default new VivaEngageUserGetCommand();
|
|
80
|
+
//# sourceMappingURL=engage-user-get.js.map
|
package/dist/m365/{yammer/commands/user/user-list.js → viva/commands/engage/engage-user-list.js}
RENAMED
|
@@ -3,27 +3,31 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
3
|
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");
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var _VivaEngageUserListCommand_instances, _VivaEngageUserListCommand_initTelemetry, _VivaEngageUserListCommand_initOptions, _VivaEngageUserListCommand_initValidators;
|
|
7
7
|
import request from '../../../../request.js';
|
|
8
|
-
import
|
|
8
|
+
import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
|
|
9
9
|
import commands from '../../commands.js';
|
|
10
|
-
|
|
10
|
+
import yammerCommands from './yammerCommands.js';
|
|
11
|
+
class VivaEngageUserListCommand extends VivaEngageCommand {
|
|
11
12
|
get name() {
|
|
12
|
-
return commands.
|
|
13
|
+
return commands.ENGAGE_USER_LIST;
|
|
13
14
|
}
|
|
14
15
|
get description() {
|
|
15
16
|
return 'Returns users from the current network';
|
|
16
17
|
}
|
|
18
|
+
alias() {
|
|
19
|
+
return [yammerCommands.USER_LIST];
|
|
20
|
+
}
|
|
17
21
|
defaultProperties() {
|
|
18
22
|
return ['id', 'full_name', 'email'];
|
|
19
23
|
}
|
|
20
24
|
constructor() {
|
|
21
25
|
super();
|
|
22
|
-
|
|
26
|
+
_VivaEngageUserListCommand_instances.add(this);
|
|
23
27
|
this.items = [];
|
|
24
|
-
__classPrivateFieldGet(this,
|
|
25
|
-
__classPrivateFieldGet(this,
|
|
26
|
-
__classPrivateFieldGet(this,
|
|
28
|
+
__classPrivateFieldGet(this, _VivaEngageUserListCommand_instances, "m", _VivaEngageUserListCommand_initTelemetry).call(this);
|
|
29
|
+
__classPrivateFieldGet(this, _VivaEngageUserListCommand_instances, "m", _VivaEngageUserListCommand_initOptions).call(this);
|
|
30
|
+
__classPrivateFieldGet(this, _VivaEngageUserListCommand_instances, "m", _VivaEngageUserListCommand_initValidators).call(this);
|
|
27
31
|
}
|
|
28
32
|
getAllItems(logger, args, page) {
|
|
29
33
|
return new Promise((resolve, reject) => {
|
|
@@ -88,6 +92,7 @@ class YammerUserListCommand extends YammerCommand {
|
|
|
88
92
|
});
|
|
89
93
|
}
|
|
90
94
|
async commandAction(logger, args) {
|
|
95
|
+
await this.showDeprecationWarning(logger, this.alias()[0], this.name);
|
|
91
96
|
this.items = []; // this will reset the items array in interactive mode
|
|
92
97
|
try {
|
|
93
98
|
await this.getAllItems(logger, args, 1);
|
|
@@ -98,7 +103,7 @@ class YammerUserListCommand extends YammerCommand {
|
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
}
|
|
101
|
-
|
|
106
|
+
_VivaEngageUserListCommand_instances = new WeakSet(), _VivaEngageUserListCommand_initTelemetry = function _VivaEngageUserListCommand_initTelemetry() {
|
|
102
107
|
this.telemetry.push((args) => {
|
|
103
108
|
Object.assign(this.telemetryProperties, {
|
|
104
109
|
letter: args.options.letter !== undefined,
|
|
@@ -108,7 +113,7 @@ _YammerUserListCommand_instances = new WeakSet(), _YammerUserListCommand_initTel
|
|
|
108
113
|
groupId: args.options.groupId !== undefined
|
|
109
114
|
});
|
|
110
115
|
});
|
|
111
|
-
},
|
|
116
|
+
}, _VivaEngageUserListCommand_initOptions = function _VivaEngageUserListCommand_initOptions() {
|
|
112
117
|
this.options.unshift({
|
|
113
118
|
option: '-g, --groupId [groupId]'
|
|
114
119
|
}, {
|
|
@@ -121,7 +126,7 @@ _YammerUserListCommand_instances = new WeakSet(), _YammerUserListCommand_initTel
|
|
|
121
126
|
option: '--sortBy [sortBy]',
|
|
122
127
|
autocomplete: ['messages', 'followers']
|
|
123
128
|
});
|
|
124
|
-
},
|
|
129
|
+
}, _VivaEngageUserListCommand_initValidators = function _VivaEngageUserListCommand_initValidators() {
|
|
125
130
|
this.validators.push(async (args) => {
|
|
126
131
|
if (args.options.groupId && typeof args.options.groupId !== 'number') {
|
|
127
132
|
return `${args.options.groupId} is not a number`;
|
|
@@ -141,5 +146,5 @@ _YammerUserListCommand_instances = new WeakSet(), _YammerUserListCommand_initTel
|
|
|
141
146
|
return true;
|
|
142
147
|
});
|
|
143
148
|
};
|
|
144
|
-
export default new
|
|
145
|
-
//# sourceMappingURL=user-list.js.map
|
|
149
|
+
export default new VivaEngageUserListCommand();
|
|
150
|
+
//# sourceMappingURL=engage-user-list.js.map
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
const prefix = 'viva';
|
|
2
2
|
export default {
|
|
3
|
-
CONNECTIONS_APP_CREATE: `${prefix} connections app create
|
|
3
|
+
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
|
+
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
5
|
+
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
6
|
+
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|
|
7
|
+
ENGAGE_MESSAGE_ADD: `${prefix} engage message add`,
|
|
8
|
+
ENGAGE_MESSAGE_GET: `${prefix} engage message get`,
|
|
9
|
+
ENGAGE_MESSAGE_LIKE_SET: `${prefix} engage message like set`,
|
|
10
|
+
ENGAGE_MESSAGE_LIST: `${prefix} engage message list`,
|
|
11
|
+
ENGAGE_MESSAGE_REMOVE: `${prefix} engage message remove`,
|
|
12
|
+
ENGAGE_NETWORK_LIST: `${prefix} engage network list`,
|
|
13
|
+
ENGAGE_REPORT_ACTIVITYCOUNTS: `${prefix} engage report activitycounts`,
|
|
14
|
+
ENGAGE_REPORT_ACTIVITYUSERCOUNTS: `${prefix} engage report activityusercounts`,
|
|
15
|
+
ENGAGE_REPORT_ACTIVITYUSERDETAIL: `${prefix} engage report activityuserdetail`,
|
|
16
|
+
ENGAGE_REPORT_DEVICEUSAGEDISTRIBUTIONUSERCOUNTS: `${prefix} engage report deviceusagedistributionusercounts`,
|
|
17
|
+
ENGAGE_REPORT_DEVICEUSAGEUSERCOUNTS: `${prefix} engage report deviceusageusercounts`,
|
|
18
|
+
ENGAGE_REPORT_DEVICEUSAGEUSERDETAIL: `${prefix} engage report deviceusageuserdetail`,
|
|
19
|
+
ENGAGE_REPORT_GROUPSACTIVITYCOUNTS: `${prefix} engage report groupsactivitycounts`,
|
|
20
|
+
ENGAGE_REPORT_GROUPSACTIVITYDETAIL: `${prefix} engage report groupsactivitydetail`,
|
|
21
|
+
ENGAGE_REPORT_GROUPSACTIVITYGROUPCOUNTS: `${prefix} engage report groupsactivitygroupcounts`,
|
|
22
|
+
ENGAGE_SEARCH: `${prefix} engage search`,
|
|
23
|
+
ENGAGE_USER_GET: `${prefix} engage user get`,
|
|
24
|
+
ENGAGE_USER_LIST: `${prefix} engage user list`
|
|
4
25
|
};
|
|
5
26
|
//# sourceMappingURL=commands.js.map
|
package/dist/request.js
CHANGED
|
@@ -130,7 +130,7 @@ class Request {
|
|
|
130
130
|
if (!this._logger) {
|
|
131
131
|
return Promise.reject('Logger not set on the request object');
|
|
132
132
|
}
|
|
133
|
-
this.updateRequestForCloudType(options, auth.
|
|
133
|
+
this.updateRequestForCloudType(options, auth.connection.cloudType);
|
|
134
134
|
return new Promise((_resolve, _reject) => {
|
|
135
135
|
(() => {
|
|
136
136
|
if (options.headers && options.headers['x-anonymous']) {
|
package/dist/utils/entraUser.js
CHANGED
|
@@ -20,6 +20,42 @@ export const entraUser = {
|
|
|
20
20
|
}
|
|
21
21
|
return res.value[0].id;
|
|
22
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve the IDs of users by their UPNs. There is no guarantee that the order of the returned IDs will match the order of the specified UPNs.
|
|
25
|
+
* @param upns Array of user UPNs.
|
|
26
|
+
* @returns Array of user IDs.
|
|
27
|
+
*/
|
|
28
|
+
async getUserIdsByUpns(upns) {
|
|
29
|
+
const userIds = [];
|
|
30
|
+
for (let i = 0; i < upns.length; i += 20) {
|
|
31
|
+
const upnsChunk = upns.slice(i, i + 20);
|
|
32
|
+
const requestOptions = {
|
|
33
|
+
url: `${graphResource}/v1.0/$batch`,
|
|
34
|
+
headers: {
|
|
35
|
+
accept: 'application/json;odata.metadata=none'
|
|
36
|
+
},
|
|
37
|
+
responseType: 'json',
|
|
38
|
+
data: {
|
|
39
|
+
requests: upnsChunk.map((upn, index) => ({
|
|
40
|
+
id: index + 1,
|
|
41
|
+
method: 'GET',
|
|
42
|
+
url: `/users/${formatting.encodeQueryParameter(upn)}?$select=id`,
|
|
43
|
+
headers: {
|
|
44
|
+
accept: 'application/json;odata.metadata=none'
|
|
45
|
+
}
|
|
46
|
+
}))
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const res = await request.post(requestOptions);
|
|
50
|
+
for (const response of res.responses) {
|
|
51
|
+
if (response.status !== 200) {
|
|
52
|
+
throw Error(`The specified user with user name '${upnsChunk[response.id - 1]}' does not exist.`);
|
|
53
|
+
}
|
|
54
|
+
userIds.push(response.body.id);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return userIds;
|
|
58
|
+
},
|
|
23
59
|
/**
|
|
24
60
|
* Retrieve the ID of a user by its email.
|
|
25
61
|
* @param mail User email.
|
package/dist/utils/spo.js
CHANGED
|
@@ -96,11 +96,11 @@ export const spo = {
|
|
|
96
96
|
});
|
|
97
97
|
},
|
|
98
98
|
async getSpoUrl(logger, debug) {
|
|
99
|
-
if (auth.
|
|
99
|
+
if (auth.connection.spoUrl) {
|
|
100
100
|
if (debug) {
|
|
101
|
-
await logger.logToStderr(`SPO URL previously retrieved ${auth.
|
|
101
|
+
await logger.logToStderr(`SPO URL previously retrieved ${auth.connection.spoUrl}. Returning...`);
|
|
102
102
|
}
|
|
103
|
-
return Promise.resolve(auth.
|
|
103
|
+
return Promise.resolve(auth.connection.spoUrl);
|
|
104
104
|
}
|
|
105
105
|
return new Promise(async (resolve, reject) => {
|
|
106
106
|
if (debug) {
|
|
@@ -116,14 +116,14 @@ export const spo = {
|
|
|
116
116
|
request
|
|
117
117
|
.get(requestOptions)
|
|
118
118
|
.then((res) => {
|
|
119
|
-
auth.
|
|
119
|
+
auth.connection.spoUrl = res.webUrl;
|
|
120
120
|
return auth.storeConnectionInfo();
|
|
121
121
|
})
|
|
122
122
|
.then(() => {
|
|
123
|
-
resolve(auth.
|
|
123
|
+
resolve(auth.connection.spoUrl);
|
|
124
124
|
}, (err) => {
|
|
125
|
-
if (auth.
|
|
126
|
-
resolve(auth.
|
|
125
|
+
if (auth.connection.spoUrl) {
|
|
126
|
+
resolve(auth.connection.spoUrl);
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
129
|
reject(err);
|
|
@@ -143,11 +143,11 @@ export const spo = {
|
|
|
143
143
|
});
|
|
144
144
|
},
|
|
145
145
|
async getTenantId(logger, debug) {
|
|
146
|
-
if (auth.
|
|
146
|
+
if (auth.connection.spoTenantId) {
|
|
147
147
|
if (debug) {
|
|
148
|
-
await logger.logToStderr(`SPO Tenant ID previously retrieved ${auth.
|
|
148
|
+
await logger.logToStderr(`SPO Tenant ID previously retrieved ${auth.connection.spoTenantId}. Returning...`);
|
|
149
149
|
}
|
|
150
|
-
return Promise.resolve(auth.
|
|
150
|
+
return Promise.resolve(auth.connection.spoTenantId);
|
|
151
151
|
}
|
|
152
152
|
return new Promise(async (resolve, reject) => {
|
|
153
153
|
if (debug) {
|
|
@@ -173,14 +173,14 @@ export const spo = {
|
|
|
173
173
|
})
|
|
174
174
|
.then((res) => {
|
|
175
175
|
const json = JSON.parse(res);
|
|
176
|
-
auth.
|
|
176
|
+
auth.connection.spoTenantId = json[json.length - 1]._ObjectIdentity_.replace('\n', '
');
|
|
177
177
|
return auth.storeConnectionInfo();
|
|
178
178
|
})
|
|
179
179
|
.then(() => {
|
|
180
|
-
resolve(auth.
|
|
180
|
+
resolve(auth.connection.spoTenantId);
|
|
181
181
|
}, (err) => {
|
|
182
|
-
if (auth.
|
|
183
|
-
resolve(auth.
|
|
182
|
+
if (auth.connection.spoTenantId) {
|
|
183
|
+
resolve(auth.connection.spoTenantId);
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
186
|
reject(err);
|
|
@@ -1312,6 +1312,28 @@ export const spo = {
|
|
|
1312
1312
|
responseType: 'json'
|
|
1313
1313
|
};
|
|
1314
1314
|
await request.post(requestOptions);
|
|
1315
|
+
},
|
|
1316
|
+
/**
|
|
1317
|
+
* Retrieves the site ID for a given web URL.
|
|
1318
|
+
* @param webUrl The web URL for which to retrieve the site ID.
|
|
1319
|
+
* @param logger The logger object.
|
|
1320
|
+
* @param verbose Set for verbose logging
|
|
1321
|
+
* @returns A promise that resolves to the site ID.
|
|
1322
|
+
*/
|
|
1323
|
+
async getSiteId(webUrl, logger, verbose) {
|
|
1324
|
+
if (verbose && logger) {
|
|
1325
|
+
logger.logToStderr(`Getting site id for URL: ${webUrl}...`);
|
|
1326
|
+
}
|
|
1327
|
+
const url = new URL(webUrl);
|
|
1328
|
+
const requestOptions = {
|
|
1329
|
+
url: `https://graph.microsoft.com/v1.0/sites/${formatting.encodeQueryParameter(url.host)}:${url.pathname}?$select=id`,
|
|
1330
|
+
headers: {
|
|
1331
|
+
accept: 'application/json;odata.metadata=none'
|
|
1332
|
+
},
|
|
1333
|
+
responseType: 'json'
|
|
1334
|
+
};
|
|
1335
|
+
const site = await request.get(requestOptions);
|
|
1336
|
+
return site.id;
|
|
1315
1337
|
}
|
|
1316
1338
|
};
|
|
1317
1339
|
//# sourceMappingURL=spo.js.map
|
package/dist/utils/urlUtil.js
CHANGED
|
@@ -166,6 +166,37 @@ export const urlUtil = {
|
|
|
166
166
|
relativeUrl = relativeUrl.substring(0, relativeUrl.length - 1);
|
|
167
167
|
}
|
|
168
168
|
return `${baseUrl}/${relativeUrl}`;
|
|
169
|
+
},
|
|
170
|
+
/**
|
|
171
|
+
* Get the absolute URL from the target SharePoint URL.
|
|
172
|
+
* @param {string} webUrl - The base web URL.
|
|
173
|
+
* @param {string} url - The target SharePoint URL.
|
|
174
|
+
* @returns {string} - The target site absolute URL.
|
|
175
|
+
*
|
|
176
|
+
* Example Scenarios:
|
|
177
|
+
* - webUrl = "https://contoso.sharepoint.com" and targetUrl = "/teams/sales/Shared Documents/temp/123/234",
|
|
178
|
+
* returns "https://contoso.sharepoint.com/teams/sales".
|
|
179
|
+
* - webUrl = "https://contoso.sharepoint.com" and targetUrl = "https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com/Documents/123",
|
|
180
|
+
* returns "https://contoso-my.sharepoint.com/personal/john_contoso_onmicrosoft_com".
|
|
181
|
+
* - webUrl = "https://contoso.sharepoint.com/teams/sales" and targetUrl = "/Shared Documents/temp",
|
|
182
|
+
* returns "https://contoso.sharepoint.com".
|
|
183
|
+
* - webUrl = "https://contoso.sharepoint.com" and targetUrl = "/teams/sales/Shared Documents/temp",
|
|
184
|
+
* returns "https://contoso.sharepoint.com/teams/sales".
|
|
185
|
+
*/
|
|
186
|
+
getTargetSiteAbsoluteUrl(webUrl, url) {
|
|
187
|
+
const fullUrl = url.startsWith('https://') ? url : urlUtil.getAbsoluteUrl(webUrl, url);
|
|
188
|
+
// Pattern to match SharePoint URLs
|
|
189
|
+
const urlPattern = /https:\/\/[\w\-]+\.sharepoint\.com\/(teams|sites|personal)\/([\w\-]+)/;
|
|
190
|
+
const match = fullUrl.match(urlPattern);
|
|
191
|
+
if (match) {
|
|
192
|
+
// If a match is found, return the matched URL
|
|
193
|
+
return match[0];
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
// Extract the root URL
|
|
197
|
+
const rootUrl = new URL(fullUrl);
|
|
198
|
+
return rootUrl.origin;
|
|
199
|
+
}
|
|
169
200
|
}
|
|
170
201
|
};
|
|
171
202
|
//# sourceMappingURL=urlUtil.js.map
|
package/dist/utils/validation.js
CHANGED
|
@@ -21,6 +21,10 @@ export const validation = {
|
|
|
21
21
|
const guidRegEx = new RegExp(/^19:[0-9a-zA-Z-_]+(@thread\.v2|@unq\.gbl\.spaces)$/i);
|
|
22
22
|
return guidRegEx.test(guid);
|
|
23
23
|
},
|
|
24
|
+
isValidUserPrincipalNameArray(upns) {
|
|
25
|
+
const invalidGuid = upns.find(upn => !this.isValidUserPrincipalName(upn));
|
|
26
|
+
return invalidGuid || true;
|
|
27
|
+
},
|
|
24
28
|
isValidUserPrincipalName(upn) {
|
|
25
29
|
const upnRegEx = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/i);
|
|
26
30
|
// verify if the upn is a valid upn. @meusername will be replaced in a later stage with the actual username of the logged in user
|
|
@@ -317,6 +321,10 @@ export const validation = {
|
|
|
317
321
|
return true;
|
|
318
322
|
}
|
|
319
323
|
return false;
|
|
324
|
+
},
|
|
325
|
+
isValidMailNickname(mailNickname) {
|
|
326
|
+
const mailNicknameRegEx = new RegExp(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]*$/i);
|
|
327
|
+
return mailNicknameRegEx.test(mailNickname);
|
|
320
328
|
}
|
|
321
329
|
};
|
|
322
330
|
//# sourceMappingURL=validation.js.map
|
|
@@ -16,25 +16,25 @@ m365 cli consent [options]
|
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
18
|
`-s, --service <service>`
|
|
19
|
-
: Service for which to consent permissions. Allowed values: `yammer
|
|
19
|
+
: Service for which to consent permissions. Allowed values: `VivaEngage`, (deprecated)`yammer`.
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
<Global />
|
|
23
23
|
|
|
24
24
|
## Remarks
|
|
25
25
|
|
|
26
|
-
Using the `cli consent` command you can consent additional permissions for the Azure AD application used by the CLI for Microsoft 365. This is for example necessary to use
|
|
26
|
+
Using the `cli consent` command you can consent additional permissions for the Azure AD application used by the CLI for Microsoft 365. This is for example necessary to use Viva Engage commands, which require the Viva Engage API permission that isn't granted to the CLI by default.
|
|
27
27
|
|
|
28
28
|
After executing the command, the CLI for Microsoft 365 will present you with a URL that you need to open in the web browser in order to consent the permissions for the selected Microsoft 365 service.
|
|
29
29
|
|
|
30
|
-
To simplify things, rather than wondering which permissions you should grant for which CLI commands, this command allows you to easily grant all the necessary permissions for using commands for the specified Microsoft 365 service, like
|
|
30
|
+
To simplify things, rather than wondering which permissions you should grant for which CLI commands, this command allows you to easily grant all the necessary permissions for using commands for the specified Microsoft 365 service, like Viva Engage.
|
|
31
31
|
|
|
32
32
|
## Examples
|
|
33
33
|
|
|
34
|
-
Consent permissions to the
|
|
34
|
+
Consent permissions to the Viva Engage API
|
|
35
35
|
|
|
36
36
|
```sh
|
|
37
|
-
m365 cli consent --service
|
|
37
|
+
m365 cli consent --service VivaEngage
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Response
|
|
@@ -43,28 +43,28 @@ m365 cli consent --service yammer
|
|
|
43
43
|
<TabItem value="JSON">
|
|
44
44
|
|
|
45
45
|
```json
|
|
46
|
-
"To consent permissions for executing
|
|
46
|
+
"To consent permissions for executing VivaEngage commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
</TabItem>
|
|
50
50
|
<TabItem value="Text">
|
|
51
51
|
|
|
52
52
|
```text
|
|
53
|
-
To consent permissions for executing
|
|
53
|
+
To consent permissions for executing VivaEngage commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
</TabItem>
|
|
57
57
|
<TabItem value="CSV">
|
|
58
58
|
|
|
59
59
|
```csv
|
|
60
|
-
To consent permissions for executing
|
|
60
|
+
To consent permissions for executing VivaEngage commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
</TabItem>
|
|
64
64
|
<TabItem value="Markdown">
|
|
65
65
|
|
|
66
66
|
```md
|
|
67
|
-
To consent permissions for executing
|
|
67
|
+
To consent permissions for executing VivaEngage commands, navigate in your web browser to https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=31359c7f-bd7e-475c-86db-fdb8c937548e&response_type=code&scope=https%3A%2F%2Fapi.yammer.com%2Fuser_impersonation
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
</TabItem>
|