@pnp/cli-microsoft365 10.11.0 → 11.0.0-beta.4be9237

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.
Files changed (40) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/m365/pp/commands.js +0 -4
  4. package/dist/m365/spo/commands/customaction/customaction-list.js +3 -10
  5. package/dist/m365/spo/commands/homesite/homesite-set.js +88 -44
  6. package/dist/m365/spo/commands.js +0 -1
  7. package/dist/m365/teams/commands/report/report-directroutingcalls.js +5 -12
  8. package/dist/m365/teams/commands/report/report-pstncalls.js +5 -12
  9. package/dist/m365/viva/commands.js +0 -3
  10. package/docs/docs/cmd/spo/homesite/homesite-set.mdx +85 -45
  11. package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +25 -44
  12. package/docs/docs/cmd/teams/report/report-pstncalls.mdx +25 -48
  13. package/docs/docs/cmd/viva/engage/engage-community-list.mdx +19 -0
  14. package/docs/docs/cmd/viva/engage/engage-community-user-add.mdx +19 -0
  15. package/docs/docs/cmd/viva/engage/engage-community-user-remove.mdx +19 -0
  16. package/npm-shrinkwrap.json +53 -53
  17. package/package.json +13 -13
  18. package/dist/m365/pp/commands/card/card-clone.js +0 -101
  19. package/dist/m365/pp/commands/card/card-get.js +0 -89
  20. package/dist/m365/pp/commands/card/card-list.js +0 -55
  21. package/dist/m365/pp/commands/card/card-remove.js +0 -105
  22. package/dist/m365/skype/commands/report/report-activitycounts.js +0 -15
  23. package/dist/m365/skype/commands/report/report-activityusercounts.js +0 -15
  24. package/dist/m365/skype/commands/report/report-activityuserdetail.js +0 -15
  25. package/dist/m365/skype/commands.js +0 -7
  26. package/dist/m365/spo/commands/mail/mail-send.js +0 -108
  27. package/dist/m365/viva/commands/engage/engage-group-list.js +0 -93
  28. package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -73
  29. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -88
  30. package/docs/docs/cmd/pp/card/card-clone.mdx +0 -103
  31. package/docs/docs/cmd/pp/card/card-get.mdx +0 -212
  32. package/docs/docs/cmd/pp/card/card-list.mdx +0 -163
  33. package/docs/docs/cmd/pp/card/card-remove.mdx +0 -86
  34. package/docs/docs/cmd/skype/report/report-activitycounts.mdx +0 -96
  35. package/docs/docs/cmd/skype/report/report-activityusercounts.mdx +0 -96
  36. package/docs/docs/cmd/skype/report/report-activityuserdetail.mdx +0 -134
  37. package/docs/docs/cmd/spo/mail/mail-send.mdx +0 -69
  38. package/docs/docs/cmd/viva/engage/engage-group-list.mdx +0 -174
  39. package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +0 -60
  40. package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +0 -58
@@ -3,10 +3,6 @@ export default {
3
3
  AIBUILDERMODEL_GET: `${prefix} aibuildermodel get`,
4
4
  AIBUILDERMODEL_LIST: `${prefix} aibuildermodel list`,
5
5
  AIBUILDERMODEL_REMOVE: `${prefix} aibuildermodel remove`,
6
- CARD_CLONE: `${prefix} card clone`,
7
- CARD_GET: `${prefix} card get`,
8
- CARD_LIST: `${prefix} card list`,
9
- CARD_REMOVE: `${prefix} card remove`,
10
6
  CHATBOT_GET: `${prefix} chatbot get`,
11
7
  CHATBOT_LIST: `${prefix} chatbot list`,
12
8
  CHATBOT_REMOVE: `${prefix} chatbot remove`,
@@ -33,17 +33,10 @@ class SpoCustomActionListCommand extends SpoCommand {
33
33
  await logger.logToStderr('');
34
34
  }
35
35
  const customActions = await spo.getCustomActions(args.options.webUrl, args.options.scope);
36
- if (customActions.length === 0) {
37
- if (this.verbose) {
38
- await logger.logToStderr(`Custom actions not found`);
39
- }
40
- }
41
- else {
42
- if (args.options.output !== 'json') {
43
- customActions.forEach(a => a.Scope = this.humanizeScope(a.Scope));
44
- }
45
- await logger.log(customActions);
36
+ if (args.options.output !== 'json') {
37
+ customActions.forEach(a => a.Scope = this.humanizeScope(a.Scope));
46
38
  }
39
+ await logger.log(customActions);
47
40
  }
48
41
  catch (err) {
49
42
  this.handleRejectedPromise(err);
@@ -1,79 +1,123 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
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
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SpoHomeSiteSetCommand_instances, _SpoHomeSiteSetCommand_initTelemetry, _SpoHomeSiteSetCommand_initOptions, _SpoHomeSiteSetCommand_initValidators, _SpoHomeSiteSetCommand_initTypes;
1
+ import { z } from 'zod';
2
+ import { zod } from '../../../../utils/zod.js';
3
+ import { globalOptionsZod } from '../../../../Command.js';
7
4
  import request from '../../../../request.js';
8
5
  import { spo } from '../../../../utils/spo.js';
9
6
  import { validation } from '../../../../utils/validation.js';
10
7
  import SpoCommand from '../../../base/SpoCommand.js';
11
8
  import commands from '../../commands.js';
9
+ import { entraGroup } from '../../../../utils/entraGroup.js';
10
+ const optionsSchema = globalOptionsZod
11
+ .extend({
12
+ url: zod.alias('u', z.string()
13
+ .refine((url) => validation.isValidSharePointUrl(url) === true, url => ({
14
+ message: `'${url}' is not a valid SharePoint Online site URL.`
15
+ }))),
16
+ vivaConnectionsDefaultStart: z.boolean().optional(),
17
+ draftMode: z.boolean().optional(),
18
+ audienceIds: z.string()
19
+ .refine(audiences => validation.isValidGuidArray(audiences) === true, audiences => ({
20
+ message: `The following GUIDs are invalid: ${validation.isValidGuidArray(audiences)}.`
21
+ })).optional(),
22
+ audienceNames: z.string().optional(),
23
+ targetedLicenseType: z.enum(['everyone', 'frontLineWorkers', 'informationWorkers']).optional(),
24
+ order: z.number()
25
+ .refine(order => validation.isValidPositiveInteger(order) === true, order => ({
26
+ message: `'${order}' is not a positive integer.`
27
+ })).optional()
28
+ });
12
29
  class SpoHomeSiteSetCommand extends SpoCommand {
13
30
  get name() {
14
31
  return commands.HOMESITE_SET;
15
32
  }
16
33
  get description() {
17
- return 'Sets the specified site as the Home Site';
34
+ return 'Updates an existing SharePoint home site.';
18
35
  }
19
- constructor() {
20
- super();
21
- _SpoHomeSiteSetCommand_instances.add(this);
22
- __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTelemetry).call(this);
23
- __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initOptions).call(this);
24
- __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initValidators).call(this);
25
- __classPrivateFieldGet(this, _SpoHomeSiteSetCommand_instances, "m", _SpoHomeSiteSetCommand_initTypes).call(this);
36
+ get schema() {
37
+ return optionsSchema;
38
+ }
39
+ getRefinedSchema(schema) {
40
+ return schema
41
+ .refine((options) => [options.audienceIds, options.audienceNames].filter(o => o !== undefined).length <= 1, {
42
+ message: 'You must specify either audienceIds or audienceNames but not both.'
43
+ })
44
+ .refine((options) => options.vivaConnectionsDefaultStart !== undefined ||
45
+ options.draftMode !== undefined ||
46
+ options.audienceIds !== undefined ||
47
+ options.audienceNames !== undefined ||
48
+ options.targetedLicenseType !== undefined ||
49
+ options.order !== undefined, {
50
+ message: 'You must specify at least one option to configure.'
51
+ });
26
52
  }
27
53
  async commandAction(logger, args) {
28
54
  try {
29
55
  if (this.verbose) {
30
- await logger.logToStderr(`Setting the SharePoint home site to: ${args.options.siteUrl}...`);
31
- await logger.logToStderr('Attempting to retrieve the SharePoint admin URL.');
56
+ await logger.logToStderr(`Configuring SharePoint home site: ${args.options.url}...`);
57
+ await logger.logToStderr(`Attempting to retrieve the SharePoint admin URL.`);
32
58
  }
33
59
  const spoAdminUrl = await spo.getSpoAdminUrl(logger, this.debug);
60
+ const configuration = {};
61
+ if (args.options.vivaConnectionsDefaultStart !== undefined) {
62
+ configuration.IsVivaConnectionsDefaultStartPresent = true;
63
+ configuration.vivaConnectionsDefaultStart = args.options.vivaConnectionsDefaultStart;
64
+ }
65
+ if (args.options.draftMode !== undefined) {
66
+ configuration.IsInDraftModePresent = true;
67
+ configuration.isInDraftMode = args.options.draftMode;
68
+ }
69
+ if (args.options.audienceIds !== undefined) {
70
+ configuration.IsAudiencesPresent = true;
71
+ configuration.Audiences = args.options.audienceIds.split(',').map(id => id.trim());
72
+ }
73
+ if (args.options.audienceNames !== undefined) {
74
+ configuration.IsAudiencesPresent = true;
75
+ configuration.Audiences = args.options.audienceNames.trim() === '' ? [] : await this.transformAudienceNamesToIds(args.options.audienceNames);
76
+ }
77
+ if (args.options.targetedLicenseType !== undefined) {
78
+ configuration.IsTargetedLicenseTypePresent = true;
79
+ configuration.TargetedLicenseType = this.convertTargetedLicenseTypeToNumber(args.options.targetedLicenseType);
80
+ }
81
+ if (args.options.order !== undefined) {
82
+ configuration.IsOrderPresent = true;
83
+ configuration.Order = args.options.order;
84
+ }
34
85
  const requestOptions = {
35
- url: `${spoAdminUrl}/_api/SPO.Tenant`,
86
+ url: `${spoAdminUrl}/_api/SPO.Tenant/UpdateTargetedSite`,
36
87
  headers: {
37
88
  accept: 'application/json;odata=nometadata',
38
89
  'content-Type': 'application/json'
39
90
  },
40
91
  responseType: 'json',
41
92
  data: {
42
- sphSiteUrl: args.options.siteUrl
93
+ siteUrl: args.options.url,
94
+ configurationParam: configuration
43
95
  }
44
96
  };
45
- if (args.options.vivaConnectionsDefaultStart !== undefined) {
46
- requestOptions.url += '/SetSPHSiteWithConfiguration';
47
- requestOptions.data.configuration = { vivaConnectionsDefaultStart: args.options.vivaConnectionsDefaultStart };
48
- }
49
- else {
50
- requestOptions.url += '/SetSPHSite';
51
- }
52
97
  const res = await request.post(requestOptions);
53
- await logger.log(res.value);
98
+ await logger.log(res);
54
99
  }
55
100
  catch (err) {
56
101
  this.handleRejectedODataJsonPromise(err);
57
102
  }
58
103
  }
104
+ convertTargetedLicenseTypeToNumber(licenseType) {
105
+ const licenseTypeMap = {
106
+ 'everyone': 0,
107
+ 'frontLineWorkers': 1,
108
+ 'informationWorkers': 2
109
+ };
110
+ return licenseTypeMap[licenseType];
111
+ }
112
+ async transformAudienceNamesToIds(audienceNames) {
113
+ const names = audienceNames.split(',');
114
+ const ids = [];
115
+ for (const name of names) {
116
+ const id = await entraGroup.getGroupIdByDisplayName(name.trim());
117
+ ids.push(id);
118
+ }
119
+ return ids;
120
+ }
59
121
  }
60
- _SpoHomeSiteSetCommand_instances = new WeakSet(), _SpoHomeSiteSetCommand_initTelemetry = function _SpoHomeSiteSetCommand_initTelemetry() {
61
- this.telemetry.push((args) => {
62
- Object.assign(this.telemetryProperties, {
63
- vivaConnectionsDefaultStart: typeof args.options.vivaConnectionsDefaultStart !== 'undefined'
64
- });
65
- });
66
- }, _SpoHomeSiteSetCommand_initOptions = function _SpoHomeSiteSetCommand_initOptions() {
67
- this.options.unshift({
68
- option: '-u, --siteUrl <siteUrl>'
69
- }, {
70
- option: '--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]',
71
- autocomplete: ['true', 'false']
72
- });
73
- }, _SpoHomeSiteSetCommand_initValidators = function _SpoHomeSiteSetCommand_initValidators() {
74
- this.validators.push(async (args) => validation.isValidSharePointUrl(args.options.siteUrl));
75
- }, _SpoHomeSiteSetCommand_initTypes = function _SpoHomeSiteSetCommand_initTypes() {
76
- this.types.boolean.push('vivaConnectionsDefaultStart');
77
- };
78
122
  export default new SpoHomeSiteSetCommand();
79
123
  //# sourceMappingURL=homesite-set.js.map
@@ -193,7 +193,6 @@ export default {
193
193
  LISTITEM_ROLEINHERITANCE_BREAK: `${prefix} listitem roleinheritance break`,
194
194
  LISTITEM_ROLEINHERITANCE_RESET: `${prefix} listitem roleinheritance reset`,
195
195
  LISTITEM_SET: `${prefix} listitem set`,
196
- MAIL_SEND: `${prefix} mail send`,
197
196
  NAVIGATION_NODE_ADD: `${prefix} navigation node add`,
198
197
  NAVIGATION_NODE_GET: `${prefix} navigation node get`,
199
198
  NAVIGATION_NODE_LIST: `${prefix} navigation node list`,
@@ -4,12 +4,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsReportDirectroutingcallsCommand_instances, _TeamsReportDirectroutingcallsCommand_initTelemetry, _TeamsReportDirectroutingcallsCommand_initOptions, _TeamsReportDirectroutingcallsCommand_initValidators;
7
- import request from '../../../../request.js';
8
7
  import { formatting } from '../../../../utils/formatting.js';
8
+ import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
10
- import GraphCommand from '../../../base/GraphCommand.js';
10
+ import GraphApplicationCommand from '../../../base/GraphCommand.js';
11
11
  import commands from '../../commands.js';
12
- class TeamsReportDirectroutingcallsCommand extends GraphCommand {
12
+ class TeamsReportDirectroutingcallsCommand extends GraphApplicationCommand {
13
13
  get allowedOutputs() {
14
14
  return ['json', 'csv'];
15
15
  }
@@ -31,16 +31,9 @@ class TeamsReportDirectroutingcallsCommand extends GraphCommand {
31
31
  }
32
32
  async commandAction(logger, args) {
33
33
  const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
34
- const requestOptions = {
35
- url: `${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
36
- headers: {
37
- accept: 'application/json;odata.metadata=none'
38
- },
39
- responseType: 'json'
40
- };
41
34
  try {
42
- const res = await request.get(requestOptions);
43
- await logger.log(res);
35
+ const response = await odata.getAllItems(`${this.resource}/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`);
36
+ await logger.log(response);
44
37
  }
45
38
  catch (err) {
46
39
  this.handleRejectedODataJsonPromise(err);
@@ -4,12 +4,12 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsReportPstncallsCommand_instances, _TeamsReportPstncallsCommand_initTelemetry, _TeamsReportPstncallsCommand_initOptions, _TeamsReportPstncallsCommand_initValidators;
7
- import request from '../../../../request.js';
8
7
  import { formatting } from '../../../../utils/formatting.js';
8
+ import { odata } from '../../../../utils/odata.js';
9
9
  import { validation } from '../../../../utils/validation.js';
10
- import GraphCommand from '../../../base/GraphCommand.js';
10
+ import GraphApplicationCommand from '../../../base/GraphCommand.js';
11
11
  import commands from '../../commands.js';
12
- class TeamsReportPstncallsCommand extends GraphCommand {
12
+ class TeamsReportPstncallsCommand extends GraphApplicationCommand {
13
13
  get allowedOutputs() {
14
14
  return ['json', 'csv'];
15
15
  }
@@ -31,16 +31,9 @@ class TeamsReportPstncallsCommand extends GraphCommand {
31
31
  }
32
32
  async commandAction(logger, args) {
33
33
  const toDateTimeParameter = formatting.encodeQueryParameter(args.options.toDateTime ? args.options.toDateTime : new Date().toISOString());
34
- const requestOptions = {
35
- url: `${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`,
36
- headers: {
37
- accept: 'application/json;odata.metadata=none'
38
- },
39
- responseType: 'json'
40
- };
41
34
  try {
42
- const res = await request.get(requestOptions);
43
- await logger.log(res);
35
+ const response = await odata.getAllItems(`${this.resource}/v1.0/communications/callRecords/getPstnCalls(fromDateTime=${formatting.encodeQueryParameter(args.options.fromDateTime)},toDateTime=${toDateTimeParameter})`);
36
+ await logger.log(response);
44
37
  }
45
38
  catch (err) {
46
39
  this.handleRejectedODataJsonPromise(err);
@@ -9,9 +9,6 @@ export default {
9
9
  ENGAGE_COMMUNITY_USER_ADD: `${prefix} engage community user add`,
10
10
  ENGAGE_COMMUNITY_USER_LIST: `${prefix} engage community user list`,
11
11
  ENGAGE_COMMUNITY_USER_REMOVE: `${prefix} engage community user remove`,
12
- ENGAGE_GROUP_LIST: `${prefix} engage group list`,
13
- ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
14
- ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
15
12
  ENGAGE_MESSAGE_ADD: `${prefix} engage message add`,
16
13
  ENGAGE_MESSAGE_GET: `${prefix} engage message get`,
17
14
  ENGAGE_MESSAGE_LIKE_SET: `${prefix} engage message like set`,
@@ -4,7 +4,7 @@ import TabItem from '@theme/TabItem';
4
4
 
5
5
  # spo homesite set
6
6
 
7
- Sets the specified site as the Home Site
7
+ Updates an existing SharePoint home site.
8
8
 
9
9
  ## Usage
10
10
 
@@ -15,11 +15,23 @@ m365 spo homesite set [options]
15
15
  ## Options
16
16
 
17
17
  ```md definition-list
18
- `-u, --siteUrl <siteUrl>`
19
- : The URL of the site to set as Home site.
18
+ `-u, --url <url>`
19
+ : The URL of the home site
20
+
21
+ `--draftMode [draftMode]`
22
+ : Set draft status. Valid values are: `true`, `false`.
23
+
24
+ `--audienceIds [audienceIds]`
25
+ : Comma-separated list of group Ids to set as audiences. Specify either `audienceIds` or `audienceNames`, but not both.
26
+
27
+ `--audienceNames [audienceNames]`
28
+ : Comma-separated list of group names to set as audiences. You must use either `audienceIds` or `audienceNames`, but not both. Pass `''` to clear audience.
29
+
30
+ `--targetedLicenseType [targetedLicenseType]`
31
+ : Value of either `everyone`, `frontLineWorkers` or `informationWorkers` to create an experience for a distinct audience by license type.
20
32
 
21
33
  `--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart]`
22
- : When set to `true`, the Viva Connections landing experience is set to the SharePoint home site. If set to `false`, the Viva Connections home experience will be used.
34
+ : Specifies whether the home site is the default start for Viva Connections. Accepts `true` or `false`.
23
35
  ```
24
36
 
25
37
  <Global />
@@ -34,91 +46,119 @@ To use this command you must be a Global or SharePoint administrator.
34
46
 
35
47
  ## Examples
36
48
 
37
- Set the specified site as the Home Site.
49
+ Sets the home site to the provided site collection url and sets the Viva Connections landing experience to the SharePoint home site
38
50
 
39
51
  ```sh
40
- m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms
52
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart true
41
53
  ```
42
54
 
43
- Sets the Home site to the provided site collection url and sets the Viva Connections landing experience to the SharePoint home site
55
+ Set the home site in draft mode
44
56
 
45
57
  ```sh
46
- m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart true
58
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --draftMode true
47
59
  ```
48
60
 
49
- Sets the Home site to the provided site collection url and sets the Viva Connections landing experience to the default experience
61
+ Set the audience to everyone
50
62
 
51
63
  ```sh
52
- m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart false
64
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --targetedLicenseType "everyone"
53
65
  ```
54
66
 
55
- ## Response
56
-
57
- ### Standard response
58
-
59
- <Tabs>
60
- <TabItem value="JSON">
61
-
62
- ```json
63
- "The Home site has been set to https://contoso.sharepoint.com. It may take some time for the change to apply. Check aka.ms/homesites for details."
64
- ```
67
+ Set the audience to groups using groups Ids
65
68
 
66
- </TabItem>
67
- <TabItem value="Text">
69
+ ```sh
70
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceIds "978b5280-4f80-47ea-a1db-b0d1d2fb1ba4,21af775d-17b3-4637-94a4-2ba8625277cb"
71
+ ```
68
72
 
69
- ```text
70
- The Home site has been set to https://contoso.sharepoint.com. It may take some time for the change to apply. Check aka.ms/homesites for details.
71
- ```
73
+ Set the audience to using their display name
72
74
 
73
- </TabItem>
74
- <TabItem value="CSV">
75
+ ```sh
76
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames "Marketing, IT department"
77
+ ```
75
78
 
76
- ```csv
77
- The Home site has been set to https://contoso.sharepoint.com. It may take some time for the change to apply. Check aka.ms/homesites for details.
78
- ```
79
+ Clear the audience and set to draft
79
80
 
80
- </TabItem>
81
- <TabItem value="Markdown">
81
+ ```sh
82
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames '' --draftMode true
83
+ ```
82
84
 
83
- ```md
84
- The Home site has been set to https://contoso.sharepoint.com. It may take some time for the change to apply. Check aka.ms/homesites for details.
85
- ```
85
+ Configure multiple options
86
86
 
87
- </TabItem>
88
- </Tabs>
87
+ ```sh
88
+ m365 spo homesite set --url https://contoso.sharepoint.com/sites/contosoportal --audienceNames 'Marketing, IT department' --draftMode true --targetedLicenseType "everyone" --vivaConnectionsDefaultStart true
89
+ ```
89
90
 
90
- ### `vivaConnectionsDefaultStart` response
91
+ ## Response
91
92
 
92
- When we make use of the option `vivaConnectionsDefaultStart` the response will differ.
93
+ ### Standard response
93
94
 
94
95
  <Tabs>
95
96
  <TabItem value="JSON">
96
97
 
97
98
  ```json
98
- "The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details."
99
+ {
100
+ "Audiences": [
101
+ {
102
+ "Email": "active@contoso.onmicrosoft.com",
103
+ "Id": "7a1eea7f-9ab0-40ff-8f2e-0083d9d63451",
104
+ "Title": "active Members"
105
+ }
106
+ ],
107
+ "IsInDraftMode": true,
108
+ "IsVivaBackendSite": false,
109
+ "SiteId": "431d7819-4aaf-49a1-b664-b2fe9e609b63",
110
+ "TargetedLicenseType": 2,
111
+ "Title": "The Landing",
112
+ "Url": "https://contoso.sharepoint.com/sites/TheLanding",
113
+ "VivaConnectionsDefaultStart": true,
114
+ "WebId": "626c1724-8ac8-45d5-af87-c07c752fab75"
115
+ }
99
116
  ```
100
117
 
101
118
  </TabItem>
102
119
  <TabItem value="Text">
103
120
 
104
121
  ```text
105
- The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
122
+ Audiences : [{"Email":"active@contoso.onmicrosoft.com","Id":"7a1eea7f-9ab0-40ff-8f2e-0083d9d63451","Title":"active Members"}]
123
+ IsInDraftMode : true
124
+ IsVivaBackendSite : false
125
+ SiteId : 431d7819-4aaf-49a1-b664-b2fe9e609b63
126
+ TargetedLicenseType : 2
127
+ Title : The Landing
128
+ Url : https://contoso.sharepoint.com/sites/TheLanding
129
+ VivaConnectionsDefaultStart: true
130
+ WebId : 626c1724-8ac8-45d5-af87-c07c752fab75
106
131
  ```
107
132
 
108
133
  </TabItem>
109
134
  <TabItem value="CSV">
110
135
 
111
136
  ```csv
112
- The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
137
+ IsInDraftMode,IsVivaBackendSite,SiteId,TargetedLicenseType,Title,Url,VivaConnectionsDefaultStart,WebId
138
+ 1,0,431d7819-4aaf-49a1-b664-b2fe9e609b63,2,The Landing,https://contoso.sharepoint.com/sites/TheLanding,1,626c1724-8ac8-45d5-af87-c07c752fab75
113
139
  ```
114
-
140
+
115
141
  </TabItem>
116
142
  <TabItem value="Markdown">
117
143
 
118
144
  ```md
119
- The Home site has been set to https://contoso.sharepoint.com and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details.
145
+ # spo homesite set --url "https://contoso.sharepoint.com/sites/TheLanding" --vivaConnectionsDefaultStart "true" --audienceNames "active"
146
+
147
+ Date: 7/27/2025
148
+
149
+ ## The Landing (https://contoso.sharepoint.com/sites/TheLanding)
150
+
151
+ Property | Value
152
+ ---------|-------
153
+ IsInDraftMode | true
154
+ IsVivaBackendSite | false
155
+ SiteId | 431d7819-4aaf-49a1-b664-b2fe9e609b63
156
+ TargetedLicenseType | 2
157
+ Title | The Landing
158
+ Url | https://contoso.sharepoint.com/sites/TheLanding
159
+ VivaConnectionsDefaultStart | true
160
+ WebId | 626c1724-8ac8-45d5-af87-c07c752fab75
120
161
  ```
121
-
122
162
  </TabItem>
123
163
  </Tabs>
124
164
 
@@ -62,42 +62,31 @@ m365 teams report directroutingcalls --fromDateTime 2020-10-31 --toDateTime 2020
62
62
  <TabItem value="JSON">
63
63
 
64
64
  ``` json
65
- {
66
- "@odata.count": 1,
67
- "value": [
68
- {
69
- "id": "9e8bba57-dc14-533a-a7dd-f0da6575eed1",
70
- "correlationId": "c98e1515-a937-4b81-b8a8-3992afde64e0",
71
- "userId": "db03c14b-06eb-4189-939b-7cbf3a20ba27",
72
- "userPrincipalName": "richard.malk@contoso.com",
73
- "userDisplayName": "Richard Malk",
74
- "startDateTime": "2019-11-01T00:00:25.105Z",
75
- "inviteDateTime": "2019-11-01T00:00:21.949Z",
76
- "failureDateTime": "0001-01-01T00:00:00Z",
77
- "endDateTime": "2019-11-01T00:00:30.105Z",
78
- "duration": 5,
79
- "callType": "ByotIn",
80
- "successfulCall": true,
81
- "callerNumber": "+12345678***",
82
- "calleeNumber": "+01234567***",
83
- "mediaPathLocation": "USWE",
84
- "signalingLocation": "EUNO",
85
- "finalSipCode": 0,
86
- "callEndSubReason": 540000,
87
- "finalSipCodePhrase": "BYE",
88
- "trunkFullyQualifiedDomainName": "tll-audiocodes01.adatum.biz",
89
- "mediaBypassEnabled": false
90
- }
91
- ]
92
- }
93
- ```
94
-
95
- </TabItem>
96
- <TabItem value="Text">
97
-
98
- ``` text
99
- id,calleeNumber,callerNumber,startDateTime
100
- 9e8bba57-dc14-533a-a7dd-f0da6575eed1,+01234567***,+12345678***,2019-11-01T00:00:25.105Z
65
+ [
66
+ {
67
+ "id": "9e8bba57-dc14-533a-a7dd-f0da6575eed1",
68
+ "correlationId": "c98e1515-a937-4b81-b8a8-3992afde64e0",
69
+ "userId": "db03c14b-06eb-4189-939b-7cbf3a20ba27",
70
+ "userPrincipalName": "richard.malk@contoso.com",
71
+ "userDisplayName": "Richard Malk",
72
+ "startDateTime": "2019-11-01T00:00:25.105Z",
73
+ "inviteDateTime": "2019-11-01T00:00:21.949Z",
74
+ "failureDateTime": "0001-01-01T00:00:00Z",
75
+ "endDateTime": "2019-11-01T00:00:30.105Z",
76
+ "duration": 5,
77
+ "callType": "ByotIn",
78
+ "successfulCall": true,
79
+ "callerNumber": "+12345678***",
80
+ "calleeNumber": "+01234567***",
81
+ "mediaPathLocation": "USWE",
82
+ "signalingLocation": "EUNO",
83
+ "finalSipCode": 0,
84
+ "callEndSubReason": 540000,
85
+ "finalSipCodePhrase": "BYE",
86
+ "trunkFullyQualifiedDomainName": "tll-audiocodes01.adatum.biz",
87
+ "mediaBypassEnabled": false
88
+ }
89
+ ]
101
90
  ```
102
91
 
103
92
  </TabItem>
@@ -108,14 +97,6 @@ m365 teams report directroutingcalls --fromDateTime 2020-10-31 --toDateTime 2020
108
97
  9e8bba57-dc14-533a-a7dd-f0da6575eed1,+01234567***,+12345678***,2019-11-01T00:00:25.105Z
109
98
  ```
110
99
 
111
- </TabItem>
112
- <TabItem value="Markdown">
113
-
114
- ```md
115
- id,calleeNumber,callerNumber,startDateTime
116
- 9e8bba57-dc14-533a-a7dd-f0da6575eed1,+01234567***,+12345678***,2019-11-01T00:00:25.105Z
117
- ```
118
-
119
100
  </TabItem>
120
101
  </Tabs>
121
102