@pnp/cli-microsoft365 9.1.0 → 10.0.0-beta.0b765ef

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 (116) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/cli/cli.js +1 -1
  4. package/dist/m365/app/commands/permission/permission-add.js +9 -9
  5. package/dist/m365/cli/commands/cli-consent.js +3 -7
  6. package/dist/m365/cli/commands/cli-doctor.js +2 -2
  7. package/dist/m365/cli/commands/config/config-set.js +0 -1
  8. package/dist/m365/cli/commands.js +1 -2
  9. package/dist/m365/commands/setupPresets.js +2 -4
  10. package/dist/m365/commands/status.js +2 -2
  11. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
  12. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
  13. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
  14. package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
  15. package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +21 -21
  16. package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
  17. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
  18. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
  19. package/dist/m365/entra/commands/m365group/m365group-set.js +24 -16
  20. package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -12
  21. package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
  22. package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -12
  23. package/dist/m365/entra/commands.js +3 -3
  24. package/dist/m365/flow/commands/environment/environment-list.js +1 -1
  25. package/dist/m365/outlook/commands/message/message-get.js +11 -11
  26. package/dist/m365/pa/commands/app/app-list.js +1 -6
  27. package/dist/m365/pa/commands/connector/connector-list.js +1 -6
  28. package/dist/m365/pa/commands/environment/environment-list.js +1 -1
  29. package/dist/m365/pp/commands/environment/environment-list.js +1 -1
  30. package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
  31. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -10
  32. package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
  33. package/dist/m365/spo/commands/app/app-list.js +1 -8
  34. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +0 -1
  35. package/dist/m365/spo/commands/contenttype/contenttype-field-remove.js +8 -8
  36. package/dist/m365/spo/commands/contenttype/contenttype-field-set.js +2 -2
  37. package/dist/m365/spo/commands/feature/feature-list.js +1 -8
  38. package/dist/m365/spo/commands/file/file-copy.js +59 -34
  39. package/dist/m365/spo/commands/file/file-move.js +55 -33
  40. package/dist/m365/spo/commands/folder/folder-set.js +0 -4
  41. package/dist/m365/spo/commands/list/list-list.js +1 -4
  42. package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
  43. package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
  44. package/dist/m365/spo/commands/page/page-list.js +1 -1
  45. package/dist/m365/spo/commands/page/page-template-list.js +1 -3
  46. package/dist/m365/spo/commands/site/site-appcatalog-remove.js +48 -24
  47. package/dist/m365/spo/commands/site/site-remove.js +1 -7
  48. package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
  49. package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
  50. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
  51. package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
  52. package/dist/m365/spo/commands/theme/theme-list.js +1 -1
  53. package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
  54. package/dist/m365/spo/commands.js +1 -2
  55. package/dist/m365/teams/commands/tab/tab-list.js +5 -3
  56. package/dist/m365/viva/commands/engage/engage-group-list.js +0 -5
  57. package/dist/m365/viva/commands/engage/engage-group-user-add.js +0 -5
  58. package/dist/m365/viva/commands/engage/engage-group-user-remove.js +0 -5
  59. package/dist/m365/viva/commands/engage/engage-message-add.js +0 -5
  60. package/dist/m365/viva/commands/engage/engage-message-get.js +0 -5
  61. package/dist/m365/viva/commands/engage/engage-message-like-set.js +0 -5
  62. package/dist/m365/viva/commands/engage/engage-message-list.js +0 -5
  63. package/dist/m365/viva/commands/engage/engage-message-remove.js +0 -5
  64. package/dist/m365/viva/commands/engage/engage-network-list.js +0 -5
  65. package/dist/m365/viva/commands/engage/engage-report-activitycounts.js +0 -8
  66. package/dist/m365/viva/commands/engage/engage-report-activityusercounts.js +0 -8
  67. package/dist/m365/viva/commands/engage/engage-report-activityuserdetail.js +0 -8
  68. package/dist/m365/viva/commands/engage/engage-report-deviceusagedistributionusercounts.js +0 -8
  69. package/dist/m365/viva/commands/engage/engage-report-deviceusageusercounts.js +0 -8
  70. package/dist/m365/viva/commands/engage/engage-report-deviceusageuserdetail.js +0 -8
  71. package/dist/m365/viva/commands/engage/engage-report-groupsactivitycounts.js +0 -8
  72. package/dist/m365/viva/commands/engage/engage-report-groupsactivitydetail.js +0 -8
  73. package/dist/m365/viva/commands/engage/engage-report-groupsactivitygroupcounts.js +0 -8
  74. package/dist/m365/viva/commands/engage/engage-search.js +0 -5
  75. package/dist/m365/viva/commands/engage/engage-user-get.js +0 -5
  76. package/dist/m365/viva/commands/engage/engage-user-list.js +0 -5
  77. package/dist/settingsNames.js +0 -1
  78. package/dist/utils/spo.js +76 -0
  79. package/docs/docs/_clisettings.mdx +0 -1
  80. package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
  81. package/docs/docs/cmd/cli/cli-consent.mdx +1 -1
  82. package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
  83. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
  84. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
  85. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
  86. package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
  87. package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +17 -17
  88. package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
  89. package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
  90. package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
  91. package/docs/docs/cmd/entra/m365group/m365group-set.mdx +9 -6
  92. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +0 -3
  93. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
  94. package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
  95. package/docs/docs/cmd/setup.mdx +1 -3
  96. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
  97. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +6 -5
  98. package/docs/docs/cmd/spo/contenttype/contenttype-field-remove.mdx +7 -7
  99. package/docs/docs/cmd/spo/contenttype/contenttype-field-set.mdx +2 -2
  100. package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
  101. package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
  102. package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
  103. package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
  104. package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
  105. package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
  106. package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
  107. package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
  108. package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
  109. package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
  110. package/npm-shrinkwrap.json +2 -2
  111. package/package.json +2 -2
  112. package/dist/m365/cli/commands/cli-reconsent.js +0 -29
  113. package/dist/m365/viva/commands/engage/yammerCommands.js +0 -25
  114. package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
  115. package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
  116. package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
@@ -9,7 +9,6 @@ import request from '../../../../request.js';
9
9
  import { formatting } from '../../../../utils/formatting.js';
10
10
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
11
11
  import commands from '../../commands.js';
12
- import yammerCommands from './yammerCommands.js';
13
12
  class VivaEngageSearchCommand extends VivaEngageCommand {
14
13
  get name() {
15
14
  return commands.ENGAGE_SEARCH;
@@ -17,9 +16,6 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
17
16
  get description() {
18
17
  return 'Returns a list of messages, users, topics and groups that match the specified query.';
19
18
  }
20
- alias() {
21
- return [yammerCommands.SEARCH];
22
- }
23
19
  constructor() {
24
20
  super();
25
21
  _VivaEngageSearchCommand_instances.add(this);
@@ -93,7 +89,6 @@ class VivaEngageSearchCommand extends VivaEngageCommand {
93
89
  }
94
90
  }
95
91
  async commandAction(logger, args) {
96
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
97
92
  this.summary = {
98
93
  messages: 0,
99
94
  groups: 0,
@@ -8,7 +8,6 @@ import request from '../../../../request.js';
8
8
  import { formatting } from '../../../../utils/formatting.js';
9
9
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
10
10
  import commands from '../../commands.js';
11
- import yammerCommands from './yammerCommands.js';
12
11
  class VivaEngageUserGetCommand extends VivaEngageCommand {
13
12
  get name() {
14
13
  return commands.ENGAGE_USER_GET;
@@ -16,9 +15,6 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
16
15
  get description() {
17
16
  return 'Retrieves the current user or searches for a user by ID or e-mail';
18
17
  }
19
- alias() {
20
- return [yammerCommands.USER_GET];
21
- }
22
18
  defaultProperties() {
23
19
  return ['id', 'full_name', 'email', 'job_title', 'state', 'url'];
24
20
  }
@@ -30,7 +26,6 @@ class VivaEngageUserGetCommand extends VivaEngageCommand {
30
26
  __classPrivateFieldGet(this, _VivaEngageUserGetCommand_instances, "m", _VivaEngageUserGetCommand_initValidators).call(this);
31
27
  }
32
28
  async commandAction(logger, args) {
33
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
34
29
  let endPoint = `${this.resource}/v1/users/current.json`;
35
30
  if (args.options.id) {
36
31
  endPoint = `${this.resource}/v1/users/${args.options.id}.json`;
@@ -7,7 +7,6 @@ var _VivaEngageUserListCommand_instances, _VivaEngageUserListCommand_initTelemet
7
7
  import request from '../../../../request.js';
8
8
  import VivaEngageCommand from '../../../base/VivaEngageCommand.js';
9
9
  import commands from '../../commands.js';
10
- import yammerCommands from './yammerCommands.js';
11
10
  class VivaEngageUserListCommand extends VivaEngageCommand {
12
11
  get name() {
13
12
  return commands.ENGAGE_USER_LIST;
@@ -15,9 +14,6 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
15
14
  get description() {
16
15
  return 'Returns users from the current network';
17
16
  }
18
- alias() {
19
- return [yammerCommands.USER_LIST];
20
- }
21
17
  defaultProperties() {
22
18
  return ['id', 'full_name', 'email'];
23
19
  }
@@ -92,7 +88,6 @@ class VivaEngageUserListCommand extends VivaEngageCommand {
92
88
  });
93
89
  }
94
90
  async commandAction(logger, args) {
95
- await this.showDeprecationWarning(logger, this.alias()[0], this.name);
96
91
  this.items = []; // this will reset the items array in interactive mode
97
92
  try {
98
93
  await this.getAllItems(logger, args, 1);
@@ -21,7 +21,6 @@ const settingsNames = {
21
21
  prompt: 'prompt',
22
22
  promptListPageSize: 'promptListPageSize',
23
23
  showHelpOnFailure: 'showHelpOnFailure',
24
- showSpinner: 'showSpinner',
25
24
  tenantId: 'tenantId'
26
25
  };
27
26
  export { settingsNames };
package/dist/utils/spo.js CHANGED
@@ -12,6 +12,16 @@ import { RoleType } from '../m365/spo/commands/roledefinition/RoleType.js';
12
12
  import { entraGroup } from './entraGroup.js';
13
13
  import { SharingCapabilities } from '../m365/spo/commands/site/SharingCapabilities.js';
14
14
  import { setTimeout } from 'timers/promises';
15
+ export var CreateCopyJobsNameConflictBehavior;
16
+ (function (CreateCopyJobsNameConflictBehavior) {
17
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Fail"] = 0] = "Fail";
18
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Replace"] = 1] = "Replace";
19
+ CreateCopyJobsNameConflictBehavior[CreateCopyJobsNameConflictBehavior["Rename"] = 2] = "Rename";
20
+ })(CreateCopyJobsNameConflictBehavior || (CreateCopyJobsNameConflictBehavior = {}));
21
+ // Wrapping this into a settings object so we can alter the values in tests
22
+ export const settings = {
23
+ pollingInterval: 3000
24
+ };
15
25
  export const spo = {
16
26
  async getRequestDigest(siteUrl) {
17
27
  const requestOptions = {
@@ -1540,6 +1550,72 @@ export const spo = {
1540
1550
  const file = await request.get(requestOptions);
1541
1551
  return file;
1542
1552
  },
1553
+ /**
1554
+ * Create a SharePoint copy job to copy a file/folder to another location.
1555
+ * @param webUrl Absolute web URL where the source file/folder is located.
1556
+ * @param sourceUrl Absolute URL of the source file/folder.
1557
+ * @param destinationUrl Absolute URL of the destination folder.
1558
+ * @param options Options for the copy job.
1559
+ * @returns Copy job information. Use {@link spo.getCopyJobResult} to get the result of the copy job.
1560
+ */
1561
+ async createCopyJob(webUrl, sourceUrl, destinationUrl, options) {
1562
+ const requestOptions = {
1563
+ url: `${webUrl}/_api/Site/CreateCopyJobs`,
1564
+ headers: {
1565
+ accept: 'application/json;odata=nometadata'
1566
+ },
1567
+ responseType: 'json',
1568
+ data: {
1569
+ destinationUri: destinationUrl,
1570
+ exportObjectUris: [sourceUrl],
1571
+ options: {
1572
+ NameConflictBehavior: options?.nameConflictBehavior ?? CreateCopyJobsNameConflictBehavior.Fail,
1573
+ AllowSchemaMismatch: true,
1574
+ BypassSharedLock: !!options?.bypassSharedLock,
1575
+ IgnoreVersionHistory: !!options?.ignoreVersionHistory,
1576
+ IncludeItemPermissions: !!options?.includeItemPermissions,
1577
+ CustomizedItemName: options?.newName ? [options.newName] : undefined,
1578
+ SameWebCopyMoveOptimization: true,
1579
+ IsMoveMode: options?.operation === 'move'
1580
+ }
1581
+ }
1582
+ };
1583
+ const response = await request.post(requestOptions);
1584
+ return response.value[0];
1585
+ },
1586
+ /**
1587
+ * Poll until the copy job is finished and return the result.
1588
+ * @param webUrl Absolute web URL where the copy job was created.
1589
+ * @param copyJobInfo Information about the copy job.
1590
+ * @throws Error if the copy job has failed.
1591
+ * @returns Information about the destination object.
1592
+ */
1593
+ async getCopyJobResult(webUrl, copyJobInfo) {
1594
+ const requestOptions = {
1595
+ url: `${webUrl}/_api/Site/GetCopyJobProgress`,
1596
+ headers: {
1597
+ accept: 'application/json;odata=nometadata'
1598
+ },
1599
+ responseType: 'json',
1600
+ data: {
1601
+ copyJobInfo: copyJobInfo
1602
+ }
1603
+ };
1604
+ let progress = await request.post(requestOptions);
1605
+ while (progress.JobState !== 0) {
1606
+ await setTimeout(settings.pollingInterval);
1607
+ progress = await request.post(requestOptions);
1608
+ }
1609
+ const logs = progress.Logs.map(l => JSON.parse(l));
1610
+ // Check if the job has failed
1611
+ const errorLog = logs.find(l => l.Event === 'JobError');
1612
+ if (errorLog) {
1613
+ throw new Error(errorLog.Message);
1614
+ }
1615
+ // Get the destination object information
1616
+ const objectInfo = logs.find(l => l.Event === 'JobFinishedObjectInfo');
1617
+ return objectInfo;
1618
+ },
1543
1619
  /**
1544
1620
  * Gets the primary owner login from a site as admin.
1545
1621
  * @param adminUrl The SharePoint admin URL
@@ -22,5 +22,4 @@ Setting name|Definition|Default value
22
22
  `prompt`|Prompts for missing values in required options and enables interactive selection when multiple values are available for a command that requires a specific value to be retrieved.|`true`
23
23
  `promptListPageSize`|By default, lists of choices longer than 7 will be paginated. Use this option to control how many choices will appear on the screen at once.|7
24
24
  `showHelpOnFailure`|Automatically display help when executing a command failed|`true`
25
- `showSpinner`|Display spinner when executing commands|`true`
26
25
  `tenantId`|ID of the default tenant to use when authenticating with|``
@@ -16,10 +16,10 @@ m365 app permission add [options]
16
16
  `--appId [appId]`
17
17
  : Client ID of the Microsoft Entra app registered in the .m365rc.json file to retrieve API permissions for.
18
18
 
19
- `--applicationPermission [applicationPermission]`
19
+ `--applicationPermissions [applicationPermissions]`
20
20
  : Space-separated list of application permissions to add.
21
21
 
22
- `--delegatedPermission [delegatedPermission]`
22
+ `--delegatedPermissions [delegatedPermissions]`
23
23
  : Space-separated list of delegated permissions to add.
24
24
 
25
25
  `--grantAdminConsent`
@@ -37,19 +37,19 @@ If you have multiple apps registered in your .m365rc.json file, you can specify
37
37
  Adds the specified application permissions to the default app registered in the _.m365rc.json_ file while granting admin consent.
38
38
 
39
39
  ```sh
40
- m365 app permission add --applicationPermission 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --grantAdminConsent
40
+ m365 app permission add --applicationPermissions 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --grantAdminConsent
41
41
  ```
42
42
 
43
43
  Adds the specified delegated permissions to the default app registered in the _.m365rc.json_ file without granting admin consent.
44
44
 
45
45
  ```sh
46
- m365 app permission add --delegatedPermission 'https://graph.microsoft.com/offline_access'
46
+ m365 app permission add --delegatedPermissions 'https://graph.microsoft.com/offline_access'
47
47
  ```
48
48
 
49
49
  Adds the specified application and delegated permissions to a specific app registered in the _.m365rc.json_ file while granting admin consent.
50
50
 
51
51
  ```sh
52
- m365 app permission add --appId '1663767b-4172-4519-bfd1-28e6ff19055b' --applicationPermission 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --delegatedPermission 'https://graph.microsoft.com/offline_access' --grantAdminConsent
52
+ m365 app permission add --appId '1663767b-4172-4519-bfd1-28e6ff19055b' --applicationPermissions 'https://graph.microsoft.com/User.ReadWrite.All https://graph.microsoft.com/User.Read.All' --delegatedPermissions 'https://graph.microsoft.com/offline_access' --grantAdminConsent
53
53
  ```
54
54
 
55
55
  ## Response
@@ -16,7 +16,7 @@ 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: `VivaEngage`, (deprecated)`yammer`.
19
+ : Service for which to consent permissions. Allowed values: `VivaEngage`.
20
20
  ```
21
21
 
22
22
  <Global />
@@ -22,7 +22,7 @@ This command gets all the necessary diagnostic information needed to triage and
22
22
 
23
23
  ## Examples
24
24
 
25
- Retrieve diagnostic information
25
+ Retrieve diagnostic information.
26
26
 
27
27
  ```sh
28
28
  m365 cli doctor
@@ -42,18 +42,20 @@ m365 cli doctor
42
42
  },
43
43
  "cliVersion": "6.1.0",
44
44
  "nodeVersion": "v16.13.0",
45
- "cliAadAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
46
- "cliAadAppTenant": "common",
47
- "authMode": "DeviceCode",
45
+ "cliEntraAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
46
+ "cliEntraAppTenant": "common",
47
+ "authMode": "deviceCode",
48
48
  "cliEnvironment": "",
49
49
  "cliConfig": {
50
50
  "output": "json",
51
51
  "showHelpOnFailure": false
52
52
  },
53
53
  "roles": [],
54
- "scopes": [
55
- "AllSites.FullControl"
56
- ]
54
+ "scopes": {
55
+ "https://graph.microsoft.com": [
56
+ "AllSites.FullControl"
57
+ ]
58
+ }
57
59
  }
58
60
  ```
59
61
 
@@ -61,24 +63,24 @@ m365 cli doctor
61
63
  <TabItem value="Text">
62
64
 
63
65
  ```text
64
- authMode : DeviceCode
65
- cliAadAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
66
- cliAadAppTenant: common
67
- cliConfig : {"output":"json","showHelpOnFailure":false}
68
- cliEnvironment :
69
- cliVersion : 6.1.0
70
- nodeVersion : v16.13.0
71
- os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
72
- roles : []
73
- scopes : ["AllSites.FullControl"]
66
+ authMode : deviceCode
67
+ cliConfig : {"output":"json","showHelpOnFailure":false}
68
+ cliEntraAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
69
+ cliEntraAppTenant: common
70
+ cliEnvironment :
71
+ cliVersion : 6.1.0
72
+ nodeVersion : v16.13.0
73
+ os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
74
+ roles : []
75
+ scopes : {"https://graph.microsoft.com":["AllSites.FullControl"]}
74
76
  ```
75
77
 
76
78
  </TabItem>
77
79
  <TabItem value="CSV">
78
80
 
79
81
  ```csv
80
- os,cliVersion,nodeVersion,cliAadAppId,cliAadAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
81
- "{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,DeviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"[""AllSites.FullControl""]"
82
+ os,cliVersion,nodeVersion,cliEntraAppId,cliEntraAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
83
+ "{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,deviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"{""https://graph.microsoft.com"":[""AllSites.FullControl""]}"
82
84
  ```
83
85
 
84
86
  </TabItem>
@@ -93,12 +95,11 @@ m365 cli doctor
93
95
  ---------|-------
94
96
  cliVersion | 6.1.0
95
97
  nodeVersion | v16.13.0
96
- cliAadAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
97
- cliAadAppTenant | common
98
- authMode | DeviceCode
98
+ cliEntraAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
99
+ cliEntraAppTenant | common
100
+ authMode | deviceCode
99
101
  cliEnvironment |
100
102
  ```
101
103
 
102
104
  </TabItem>
103
105
  </Tabs>
104
-
@@ -22,39 +22,39 @@ m365 entra sp add [options]
22
22
  ## Options
23
23
 
24
24
  ```md definition-list
25
- `--appId [appId]`
26
- : ID of the app for which the enterprise application should be created
25
+ `-i, --id [id]`
26
+ : ID of the app for which the enterprise application should be created.
27
27
 
28
- `--appName [appName]`
29
- : Display name of the app for which the enterprise application should be created
28
+ `-n, --displayName [displayName]`
29
+ : Display name of the app for which the enterprise application should be created.
30
30
 
31
31
  `--objectId [objectId]`
32
- : ObjectId of the app for which the enterprise application should be created
32
+ : ObjectId of the app for which the enterprise application should be created.
33
33
  ```
34
34
 
35
35
  <Global />
36
36
 
37
37
  ## Remarks
38
38
 
39
- Specify either the `appId`, `appName` or `objectId`. If you specify more than one option value, the command will fail with an error.
39
+ Specify either the `id`, `displayName` or `objectId`. If you specify more than one option value, the command will fail with an error.
40
40
 
41
41
  If you register an application in the portal, an application object as well as an enterprise application object are automatically created in your home tenant. If you register an application using CLI for Microsoft 365 or the Microsoft Graph, you'll need to create the enterprise application separately. To register/create an application using the CLI for Microsoft 365, use the [m365 entra app add](../app/app-add.mdx) command.
42
42
 
43
43
  ## Examples
44
44
 
45
- Creates an enterprise application for a registered Entra app with appId _b2307a39-e878-458b-bc90-03bc578531d6_.
45
+ Creates an enterprise application for a registered Entra app with the specified id.
46
46
 
47
47
  ```sh
48
- m365 entra enterpriseapp add --appId b2307a39-e878-458b-bc90-03bc578531d6
48
+ m365 entra enterpriseapp add --id b2307a39-e878-458b-bc90-03bc578531d6
49
49
  ```
50
50
 
51
- Creates an enterprise application for a registered Entra app with appName _Microsoft Graph_.
51
+ Creates an enterprise application for a registered Entra app with the specified displayName.
52
52
 
53
53
  ```sh
54
- m365 entra enterpriseapp add --appName "Microsoft Graph"
54
+ m365 entra enterpriseapp add --displayName "Microsoft Graph"
55
55
  ```
56
56
 
57
- Creates an enterprise application for a registered Entra app with objectId _b2307a39-e878-458b-bc90-03bc578531d6_.
57
+ Creates an enterprise application for a registered Entra app with the specified objectId.
58
58
 
59
59
  ```sh
60
60
  m365 entra enterpriseapp add --objectId b2307a39-e878-458b-bc90-03bc578531d6
@@ -172,7 +172,7 @@ m365 entra enterpriseapp add --objectId b2307a39-e878-458b-bc90-03bc578531d6
172
172
  <TabItem value="Markdown">
173
173
 
174
174
  ```md
175
- # entra enterpriseapp add --appId "8da75b6a-4272-4b17-8ee1-20ba66e2b06f"
175
+ # entra enterpriseapp add --id "8da75b6a-4272-4b17-8ee1-20ba66e2b06f"
176
176
 
177
177
  Date: 2023-06-02
178
178
 
@@ -22,40 +22,40 @@ m365 entra sp get [options]
22
22
  ## Options
23
23
 
24
24
  ```md definition-list
25
- `-i, --appId [appId]`
26
- : ID of the application for which the enterprise application should be retrieved
25
+ `-i, --id [id]`
26
+ : ID of the application for which the enterprise application should be retrieved.
27
27
 
28
- `-n, --appDisplayName [appDisplayName]`
29
- : Display name of the application for which the enterprise application should be retrieved
28
+ `-n, --displayName [displayName]`
29
+ : Display name of the application for which the enterprise application should be retrieved.
30
30
 
31
- `--appObjectId [appObjectId]`
32
- : ObjectId of the application for which the enterprise application should be retrieved
31
+ `--objectId [objectId]`
32
+ : ObjectId of the application for which the enterprise application should be retrieved.
33
33
  ```
34
34
 
35
35
  <Global />
36
36
 
37
37
  ## Remarks
38
38
 
39
- Specify either the `appId`, `appObjectId` or `appDisplayName`. If you specify more than one option value, the command will fail with an error.
39
+ Specify either the `id`, `objectId` or `displayName`. If you specify more than one option value, the command will fail with an error.
40
40
 
41
41
  ## Examples
42
42
 
43
- Return details about the enterprise application with appId _b2307a39-e878-458b-bc90-03bc578531d6_.
43
+ Return details about the enterprise application with the specified id.
44
44
 
45
45
  ```sh
46
- m365 entra enterpriseapp get --appId b2307a39-e878-458b-bc90-03bc578531d6
46
+ m365 entra enterpriseapp get --id b2307a39-e878-458b-bc90-03bc578531d6
47
47
  ```
48
48
 
49
- Return details about the _Microsoft Graph_ enterprise application.
49
+ Return details about the enterprise application with the specified displayName.
50
50
 
51
51
  ```sh
52
- m365 entra enterpriseapp get --appDisplayName "Microsoft Graph"
52
+ m365 entra enterpriseapp get --displayName "Microsoft Graph"
53
53
  ```
54
54
 
55
- Return details about the enterprise application with ObjectId _b2307a39-e878-458b-bc90-03bc578531dd_.
55
+ Return details about the enterprise application with the specified ObjectId.
56
56
 
57
57
  ```sh
58
- m365 entra enterpriseapp get --appObjectId b2307a39-e878-458b-bc90-03bc578531dd
58
+ m365 entra enterpriseapp get --objectId b2307a39-e878-458b-bc90-03bc578531dd
59
59
  ```
60
60
 
61
61
  ## Response
@@ -198,7 +198,7 @@ m365 entra enterpriseapp get --appObjectId b2307a39-e878-458b-bc90-03bc578531dd
198
198
  <TabItem value="Markdown">
199
199
 
200
200
  ```md
201
- # entra enterpriseapp get --appId "ac7c9b4b-83b0-4a5e-ace2-a3530162c8f8"
201
+ # entra enterpriseapp get --id "ac7c9b4b-83b0-4a5e-ace2-a3530162c8f8"
202
202
 
203
203
  Date: 2023-06-02
204
204
 
@@ -22,24 +22,24 @@ m365 entra sp list [options]
22
22
  ## Options
23
23
 
24
24
  ```md definition-list
25
- `--displayName [displayName]`
26
- : Returns only enterprise applications with the specified name
25
+ `-n, --displayName [displayName]`
26
+ : Returns only enterprise applications with the specified name.
27
27
 
28
28
  `--tag [tag]`
29
- : Returns only enterprise applications with the specified tag
29
+ : Returns only enterprise applications with the specified tag.
30
30
  ```
31
31
 
32
32
  <Global />
33
33
 
34
34
  ## Examples
35
35
 
36
- Return a list of all enterprise applications
36
+ Returns a list of all enterprise applications.
37
37
 
38
38
  ```sh
39
39
  m365 entra enterpriseapp list
40
40
  ```
41
41
 
42
- Return a list of all enterprise applications that comply with the display name and the tag parameters
42
+ Returns a list of all enterprise applications that comply with the specified display name and the tag parameters.
43
43
 
44
44
  ```sh
45
45
  m365 entra enterpriseapp list --displayName "My custom enterprise application" --tag "WindowsAzureActiveDirectoryIntegratedApp"
@@ -0,0 +1,62 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # entra group member add
4
+
5
+ Adds a member to a Microsoft Entra ID group
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 entra group member add [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-i, --groupId [groupId]`
17
+ : The ID of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
18
+
19
+ `-n, --groupDisplayName [groupDisplayName]`
20
+ : The display name of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
21
+
22
+ `--ids [ids]`
23
+ : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
24
+
25
+ `--userNames [userNames]`
26
+ : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
27
+
28
+ `-r, --role <role>`
29
+ : The role to be assigned to the new users. Valid values: `Owner`, `Member`.
30
+ ```
31
+
32
+ <Global />
33
+
34
+ ## Examples
35
+
36
+ Add a single member specified by ID as a member to a group specified by display name.
37
+
38
+ ```sh
39
+ m365 entra group member add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
40
+ ```
41
+
42
+ Add multiple members specified by ID as members to a group specified by ID.
43
+
44
+ ```sh
45
+ m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
46
+ ```
47
+
48
+ Add a single member specified by UPN as an owner to a group specified by display name.
49
+
50
+ ```sh
51
+ m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
52
+ ```
53
+
54
+ Adds multiple members specified by UPN as owners to a group specified by ID.
55
+
56
+ ```sh
57
+ m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner
58
+ ```
59
+
60
+ ## Response
61
+
62
+ The command won't return a response on success.
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
2
2
  import Tabs from '@theme/Tabs';
3
3
  import TabItem from '@theme/TabItem';
4
4
 
5
- # entra group user list
5
+ # entra group member list
6
6
 
7
- Lists users of a specific Entra group
7
+ Lists members of a specific Entra group
8
8
 
9
9
  ## Usage
10
10
 
11
11
  ```sh
12
- m365 entra group user list [options]
12
+ m365 entra group member list [options]
13
13
  ```
14
14
 
15
15
  ## Alias
@@ -22,19 +22,19 @@ m365 aad group user list [options]
22
22
 
23
23
  ```md definition-list
24
24
  `-i, --groupId [groupId]`
25
- : The ID of the Entra group. Specify `groupId` or `groupDisplayName` but not both.
25
+ : The ID of the Entra group. Specify `groupId` or `groupName` but not both.
26
26
 
27
- `-n, --groupDisplayName [groupDisplayName]`
28
- : The display name of the Entra group. Specify `groupId` or `groupDisplayName` but not both.
27
+ `-n, --groupName [groupName]`
28
+ : The display name of the Entra group. Specify `groupId` or `groupName` but not both.
29
29
 
30
30
  `-r, --role [role]`
31
- : Filter the results to only users with the given role: `Owner`, `Member`.
31
+ : Filter the results to only members with the given role: `Owner`, `Member`.
32
32
 
33
33
  `-p, --properties [properties]`
34
34
  : Comma-separated list of properties to retrieve.
35
35
 
36
36
  `-f, --filter [filter]`
37
- : OData filter to use to query the list of users with.
37
+ : OData filter to use to query the list of members with.
38
38
  ```
39
39
 
40
40
  <Global />
@@ -45,34 +45,34 @@ When the `properties` option includes values with a `/`, for example: `manager/d
45
45
 
46
46
  ## Examples
47
47
 
48
- List all group users from a group specified by ID.
48
+ List all group members from a group specified by ID.
49
49
 
50
50
  ```sh
51
- m365 entra group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
51
+ m365 entra group member list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
52
52
  ```
53
53
 
54
54
  List all owners from a group specified by display name.
55
55
 
56
56
  ```sh
57
- m365 entra group user list --groupDisplayName Developers --role Owner
57
+ m365 entra group member list --groupName Developers --role Owner
58
58
  ```
59
59
 
60
- List all group users from a group specified by name. For each one return the display name, e-mail address, and manager display name.
60
+ List all group members from a group specified by name. For each one return the display name, e-mail address, and manager display name.
61
61
 
62
62
  ```sh
63
- m365 entra group user list --groupDisplayName Developers --properties "displayName,mail,manager/displayName"
63
+ m365 entra group member list --groupName Developers --properties "displayName,mail,manager/displayName"
64
64
  ```
65
65
 
66
- List all group users from a group specified by name. For each one return the display name, e-mail address, and manager information.
66
+ List all group members from a group specified by name. For each one return the display name, e-mail address, and manager information.
67
67
 
68
68
  ```sh
69
- m365 entra group user list --groupDisplayName Developers --properties "displayName,mail,manager/*"
69
+ m365 entra group member list --groupName Developers --properties "displayName,mail,manager/*"
70
70
  ```
71
71
 
72
- List all group members that are guest users.
72
+ List all group members that are guest members.
73
73
 
74
74
  ```sh
75
- m365 entra group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
75
+ m365 entra group member list --groupName Developers --filter "userType eq 'Guest'"
76
76
  ```
77
77
 
78
78
  ## Response