@pnp/cli-microsoft365 9.0.0-beta.e16d09c → 9.0.0-beta.e69e8d0

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 (58) hide show
  1. package/allCommands.json +1 -1
  2. package/allCommandsFull.json +1 -1
  3. package/dist/config.js +1 -1
  4. package/dist/m365/app/commands/permission/permission-add.js +9 -9
  5. package/dist/m365/commands/status.js +2 -2
  6. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +13 -13
  7. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +18 -18
  8. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -1
  9. package/dist/m365/entra/commands/group/group-user-list.js +4 -4
  10. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +4 -4
  11. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +3 -3
  12. package/dist/m365/entra/commands/m365group/m365group-user-add.js +109 -32
  13. package/dist/m365/entra/commands/m365group/m365group-user-list.js +6 -9
  14. package/dist/m365/entra/commands/m365group/m365group-user-set.js +159 -84
  15. package/dist/m365/flow/commands/flow-get.js +1 -1
  16. package/dist/m365/outlook/commands/message/message-get.js +11 -11
  17. package/dist/m365/pa/commands/app/app-export.js +13 -7
  18. package/dist/m365/spfx/commands/project/DeployWorkflow.js +1 -1
  19. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +1 -10
  20. package/dist/m365/spo/commands/file/file-copy.js +55 -34
  21. package/dist/m365/spo/commands/folder/folder-set.js +0 -4
  22. package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +86 -0
  23. package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +110 -0
  24. package/dist/m365/spo/commands/list/ListInstance.js +6 -1
  25. package/dist/m365/spo/commands/list/list-get.js +9 -3
  26. package/dist/m365/spo/commands/list/list-list.js +1 -4
  27. package/dist/m365/spo/commands/site/site-appcatalog-remove.js +48 -24
  28. package/dist/m365/spo/commands/site/site-remove.js +1 -7
  29. package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-restore.js +2 -22
  30. package/dist/m365/spo/commands.js +2 -1
  31. package/dist/utils/drive.js +61 -0
  32. package/dist/utils/spo.js +106 -0
  33. package/docs/docs/cmd/app/permission/permission-add.mdx +5 -5
  34. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +12 -12
  35. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +14 -14
  36. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-list.mdx +5 -5
  37. package/docs/docs/cmd/entra/group/group-user-list.mdx +7 -7
  38. package/docs/docs/cmd/entra/m365group/m365group-conversation-post-list.mdx +5 -5
  39. package/docs/docs/cmd/entra/m365group/m365group-recyclebinitem-list.mdx +3 -3
  40. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +28 -10
  41. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +1 -1
  42. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +35 -11
  43. package/docs/docs/cmd/flow/flow-get.mdx +149 -283
  44. package/docs/docs/cmd/outlook/message/message-get.mdx +5 -5
  45. package/docs/docs/cmd/pa/app/app-export.mdx +15 -9
  46. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +11 -12
  47. package/docs/docs/cmd/spo/app/app-uninstall.mdx +1 -1
  48. package/docs/docs/cmd/spo/file/file-copy.mdx +119 -12
  49. package/docs/docs/cmd/spo/folder/folder-set.mdx +0 -6
  50. package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +110 -0
  51. package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +114 -0
  52. package/docs/docs/cmd/spo/list/list-get.mdx +6 -0
  53. package/docs/docs/cmd/spo/list/list-list.mdx +5 -7
  54. package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +11 -2
  55. package/docs/docs/cmd/spo/site/site-remove.mdx +0 -3
  56. package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +2 -49
  57. package/npm-shrinkwrap.json +572 -477
  58. package/package.json +22 -22
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 = {
@@ -1405,6 +1415,38 @@ export const spo = {
1405
1415
  const site = await request.get(requestOptions);
1406
1416
  return site.id;
1407
1417
  },
1418
+ /**
1419
+ * Retrieves the server-relative URL of a folder.
1420
+ * @param webUrl Web URL
1421
+ * @param folderUrl Folder URL
1422
+ * @param folderId Folder ID
1423
+ * @param logger The logger object
1424
+ * @param verbose Set for verbose logging
1425
+ * @returns The server-relative URL of the folder
1426
+ */
1427
+ async getFolderServerRelativeUrl(webUrl, folderUrl, folderId, logger, verbose) {
1428
+ if (verbose && logger) {
1429
+ await logger.logToStderr(`Retrieving server-relative URL for folder ${folderUrl ? `URL: ${folderUrl}` : `ID: ${folderId}`}`);
1430
+ }
1431
+ let requestUrl = `${webUrl}/_api/web/`;
1432
+ if (folderUrl) {
1433
+ const folderServerRelativeUrl = urlUtil.getServerRelativePath(webUrl, folderUrl);
1434
+ requestUrl += `GetFolderByServerRelativePath(decodedUrl='${formatting.encodeQueryParameter(folderServerRelativeUrl)}')`;
1435
+ }
1436
+ else {
1437
+ requestUrl += `GetFolderById('${folderId}')`;
1438
+ }
1439
+ requestUrl += '?$select=ServerRelativeUrl';
1440
+ const requestOptions = {
1441
+ url: requestUrl,
1442
+ headers: {
1443
+ accept: 'application/json;odata=nometadata'
1444
+ },
1445
+ responseType: 'json'
1446
+ };
1447
+ const res = await request.get(requestOptions);
1448
+ return res.ServerRelativeUrl;
1449
+ },
1408
1450
  /**
1409
1451
  * Retrieves the ObjectIdentity from a SharePoint site
1410
1452
  * @param webUrl web url
@@ -1484,6 +1526,70 @@ export const spo = {
1484
1526
  };
1485
1527
  const itemsResponse = await request.get(requestOptionsItems);
1486
1528
  return (itemsResponse);
1529
+ },
1530
+ /**
1531
+ * Create a SharePoint copy job to copy a file/folder to another location.
1532
+ * @param webUrl Absolute web URL where the source file/folder is located.
1533
+ * @param sourceUrl Absolute URL of the source file/folder.
1534
+ * @param destinationUrl Absolute URL of the destination folder.
1535
+ * @param options Options for the copy job.
1536
+ * @returns Copy job information. Use {@link spo.getCopyJobResult} to get the result of the copy job.
1537
+ */
1538
+ async createCopyJob(webUrl, sourceUrl, destinationUrl, options) {
1539
+ const requestOptions = {
1540
+ url: `${webUrl}/_api/Site/CreateCopyJobs`,
1541
+ headers: {
1542
+ accept: 'application/json;odata=nometadata'
1543
+ },
1544
+ responseType: 'json',
1545
+ data: {
1546
+ destinationUri: destinationUrl,
1547
+ exportObjectUris: [sourceUrl],
1548
+ options: {
1549
+ NameConflictBehavior: options?.nameConflictBehavior ?? CreateCopyJobsNameConflictBehavior.Fail,
1550
+ AllowSchemaMismatch: true,
1551
+ BypassSharedLock: !!options?.bypassSharedLock,
1552
+ IgnoreVersionHistory: !!options?.ignoreVersionHistory,
1553
+ CustomizedItemName: options?.newName ? [options.newName] : undefined,
1554
+ SameWebCopyMoveOptimization: true
1555
+ }
1556
+ }
1557
+ };
1558
+ const response = await request.post(requestOptions);
1559
+ return response.value[0];
1560
+ },
1561
+ /**
1562
+ * Poll until the copy job is finished and return the result.
1563
+ * @param webUrl Absolute web URL where the copy job was created.
1564
+ * @param copyJobInfo Information about the copy job.
1565
+ * @throws Error if the copy job has failed.
1566
+ * @returns Information about the destination object.
1567
+ */
1568
+ async getCopyJobResult(webUrl, copyJobInfo) {
1569
+ const requestOptions = {
1570
+ url: `${webUrl}/_api/Site/GetCopyJobProgress`,
1571
+ headers: {
1572
+ accept: 'application/json;odata=nometadata'
1573
+ },
1574
+ responseType: 'json',
1575
+ data: {
1576
+ copyJobInfo: copyJobInfo
1577
+ }
1578
+ };
1579
+ let progress = await request.post(requestOptions);
1580
+ while (progress.JobState !== 0) {
1581
+ await setTimeout(settings.pollingInterval);
1582
+ progress = await request.post(requestOptions);
1583
+ }
1584
+ const logs = progress.Logs.map(l => JSON.parse(l));
1585
+ // Check if the job has failed
1586
+ const errorLog = logs.find(l => l.Event === 'JobError');
1587
+ if (errorLog) {
1588
+ throw new Error(errorLog.Message);
1589
+ }
1590
+ // Get the destination object information
1591
+ const objectInfo = logs.find(l => l.Event === 'JobFinishedObjectInfo');
1592
+ return objectInfo;
1487
1593
  }
1488
1594
  };
1489
1595
  //# sourceMappingURL=spo.js.map
@@ -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
@@ -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"
@@ -22,10 +22,10 @@ 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
31
  : Filter the results to only users with the given role: `Owner`, `Member`.
@@ -54,25 +54,25 @@ m365 entra group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
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 user list --groupName Developers --role Owner
58
58
  ```
59
59
 
60
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.
61
61
 
62
62
  ```sh
63
- m365 entra group user list --groupDisplayName Developers --properties "displayName,mail,manager/displayName"
63
+ m365 entra group user list --groupName Developers --properties "displayName,mail,manager/displayName"
64
64
  ```
65
65
 
66
66
  List all group users 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 user list --groupName Developers --properties "displayName,mail,manager/*"
70
70
  ```
71
71
 
72
72
  List all group members that are guest users.
73
73
 
74
74
  ```sh
75
- m365 entra group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
75
+ m365 entra group user list --groupName Developers --filter "userType eq 'Guest'"
76
76
  ```
77
77
 
78
78
  ## Response
@@ -22,10 +22,10 @@ m365 aad m365group conversation post list [options]
22
22
 
23
23
  ```md definition-list
24
24
  `-i, --groupId [groupId]`
25
- : The Id of the Microsoft 365 Group. You can specify the groupId or groupDisplayName, but not both.
25
+ : The Id of the Microsoft 365 Group. You can specify the groupId or groupName, but not both.
26
26
 
27
- `-d, --groupDisplayName [groupDisplayName]`
28
- : The Displayname of the Microsoft 365 Group. You can specify the groupId or groupDisplayName, but not both.
27
+ `-d, --groupName [groupName]`
28
+ : The Displayname of the Microsoft 365 Group. You can specify the groupId or groupName, but not both.
29
29
 
30
30
  `-t, --threadId <threadId>`
31
31
  : The ID of the thread to retrieve details for
@@ -41,10 +41,10 @@ Lists the posts of the specific conversation of Microsoft 365 group by groupId
41
41
  m365 entra m365group conversation post list --groupId '00000000-0000-0000-0000-000000000000' --threadId 'AAQkADkwN2Q2NDg1LWQ3ZGYtNDViZi1iNGRiLTVhYjJmN2Q5NDkxZQAQAOnRAfDf71lIvrdK85FAn5E='
42
42
  ```
43
43
 
44
- Lists the posts of the specific conversation of Microsoft 365 group by groupDisplayName
44
+ Lists the posts of the specific conversation of Microsoft 365 group by groupName
45
45
 
46
46
  ```sh
47
- m365 entra m365group conversation post list --groupDisplayName 'MyGroup' --threadId 'AAQkADkwN2Q2NDg1LWQ3ZGYtNDViZi1iNGRiLTVhYjJmN2Q5NDkxZQAQAOnRAfDf71lIvrdK85FAn5E='
47
+ m365 entra m365group conversation post list --groupName 'MyGroup' --threadId 'AAQkADkwN2Q2NDg1LWQ3ZGYtNDViZi1iNGRiLTVhYjJmN2Q5NDkxZQAQAOnRAfDf71lIvrdK85FAn5E='
48
48
  ```
49
49
 
50
50
  ## Response
@@ -21,7 +21,7 @@ m365 aad m365group recyclebinitem list [options]
21
21
  ## Options
22
22
 
23
23
  ```md definition-list
24
- `-d, --groupDisplayName [groupDisplayName]`
24
+ `-d, --groupName [groupName]`
25
25
  : Lists groups with DisplayName starting with the specified value
26
26
 
27
27
  `-m, --groupMailNickname [groupMailNickname]`
@@ -41,7 +41,7 @@ m365 entra m365group recyclebinitem list
41
41
  List deleted Microsoft 365 Groups with display name starting with _Project_
42
42
 
43
43
  ```sh
44
- m365 entra m365group recyclebinitem list --groupDisplayName Project
44
+ m365 entra m365group recyclebinitem list --groupName Project
45
45
  ```
46
46
 
47
47
  List deleted Microsoft 365 Groups mail nick name starting with _team_
@@ -53,7 +53,7 @@ m365 entra m365group recyclebinitem list --groupMailNickname team
53
53
  List deleted Microsoft 365 Groups mail nick name starting with _team_ and with display name starting with _Project_
54
54
 
55
55
  ```sh
56
- m365 entra m365group recyclebinitem list --groupMailNickname team --groupDisplayName Project
56
+ m365 entra m365group recyclebinitem list --groupMailNickname team --groupName Project
57
57
  ```
58
58
 
59
59
  ## Response
@@ -26,13 +26,25 @@ m365 teams user add
26
26
 
27
27
  ```md definition-list
28
28
  `-i, --groupId [groupId]`
29
- : The ID of the Microsoft 365 Group to which to add the user
29
+ : The ID of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
30
+
31
+ `--groupName [groupName]`
32
+ : The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
30
33
 
31
34
  `--teamId [teamId]`
32
- : The ID of the Teams team to which to add the user
35
+ : The ID of the Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
36
+
37
+ `--teamName [teamName]`
38
+ : The display name of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
39
+
40
+ `-n, --userName [userName]`
41
+ : (deprecated) User's UPN (User Principal Name), e.g. johndoe@example.com.
42
+
43
+ `--ids [ids]`
44
+ : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
33
45
 
34
- `-n, --userName <userName>`
35
- : User's UPN (user principal name, eg. johndoe@example.com)
46
+ `--userNames [userNames]`
47
+ : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
36
48
 
37
49
  `-r, --role [role]`
38
50
  : The role to be assigned to the new user: `Owner,Member`. Default `Member`
@@ -42,22 +54,28 @@ m365 teams user add
42
54
 
43
55
  ## Examples
44
56
 
45
- Add a new member to the specified Microsoft 365 Group
57
+ Add a new member with the userNames parameter to the specified Microsoft 365 Group
58
+
59
+ ```sh
60
+ m365 entra m365group user add --groupId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com'
61
+ ```
62
+
63
+ Add multiple new owners with the userNames parameter to the specified Microsoft 365 Group
46
64
 
47
65
  ```sh
48
- m365 entra m365group user add --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com'
66
+ m365 entra m365group user add --groupName 'Contoso' --userNames 'anne.matthews@contoso.onmicrosoft.com, john.doe@contoso.onmicrosoft.com' --role Owner
49
67
  ```
50
68
 
51
- Add a new owner to the specified Microsoft 365 Group
69
+ Add a new member with the userNames parameter to the specified Microsoft Teams team
52
70
 
53
71
  ```sh
54
- m365 entra m365group user add --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --role Owner
72
+ m365 entra m365group member add --teamId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com' --role Member
55
73
  ```
56
74
 
57
- Add a new member to the specified Microsoft Teams team
75
+ Add multiple new members with the ids parameter to the specified Microsoft Teams team
58
76
 
59
77
  ```sh
60
- m365 teams user add --teamId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com'
78
+ m365 entra m365group user add --teamName 'Engineering' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Member
61
79
  ```
62
80
 
63
81
  ## Response
@@ -28,7 +28,7 @@ m365 aad m365group user list [options]
28
28
  : The display name of the Microsoft 365 group. Specify `groupId` or `groupDisplayName` but not both.
29
29
 
30
30
  `-r, --role [role]`
31
- : Filter the results to only users with the given role. Allowed values: `Owner`, `Member`, or (Deprecated) `Guest`.
31
+ : Filter the results to only users with the given role. Allowed values: `Owner`, `Member`.
32
32
 
33
33
  `-p, --properties [properties]`
34
34
  : Comma-separated list of properties to retrieve.
@@ -2,7 +2,7 @@ import Global from '/docs/cmd/_global.mdx';
2
2
 
3
3
  # entra m365group user set
4
4
 
5
- Updates role of the specified user in the specified Microsoft 365 Group or Microsoft Teams team
5
+ Updates role of the specified users in the specified Microsoft 365 Group or Microsoft Teams team
6
6
 
7
7
  ## Usage
8
8
 
@@ -24,13 +24,25 @@ m365 aad teams user set
24
24
 
25
25
  ```md definition-list
26
26
  `-i, --groupId [groupId]`
27
- : The ID of the Microsoft 365 group for which to update user
27
+ : The ID of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
28
+
29
+ `--groupName [groupName]`
30
+ : The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
28
31
 
29
32
  `--teamId [teamId]`
30
- : The ID of the Microsoft Teams team for which to update user
33
+ : The ID of the Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
34
+
35
+ `--teamName [teamName]`
36
+ : The display name of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
37
+
38
+ `-n, --userName [userName]`
39
+ : (deprecated) User's UPN (User Principal Name), e.g. johndoe@example.com.
31
40
 
32
- `-n, --userName <userName>`
33
- : UPN of the user for whom to update the role (eg. johndoe@example.com)
41
+ `--ids [ids]`
42
+ : Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify only one of the following `userName`, `ids` or `userNames`.
43
+
44
+ `--userNames [userNames]`
45
+ : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify only one of the following `userName`, `ids` or `userNames`.
34
46
 
35
47
  `-r, --role <role>`
36
48
  : Role to set for the given user in the specified Microsoft 365 Group or Microsoft Teams team. Allowed values: `Owner`, `Member`
@@ -44,28 +56,40 @@ The command will return an error if the user already has the specified role in t
44
56
 
45
57
  ## Examples
46
58
 
47
- Promote the specified user to owner of the given Microsoft 365 Group
59
+ Promote a single user to Owner of the given Microsoft 365 Group
48
60
 
49
61
  ```sh
50
62
  m365 entra m365group user set --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --role Owner
51
63
  ```
52
64
 
53
- Demote the specified user from owner to member in the given Microsoft 365 Group
65
+ Promote multiple users specified by the userNames parameter to Owner of the given Microsoft 365 Group
66
+
67
+ ```sh
68
+ m365 entra m365group user set --groupName 'Contoso' --userNames 'anne.matthews@contoso.onmicrosoft.com,john.doe@contoso.onmicrosoft.com' --role Owner
69
+ ```
70
+
71
+ Promote multiple users specified by the ids parameter to Owner of the given Microsoft 365 Group
72
+
73
+ ```sh
74
+ m365 entra m365group user set --groupId '00000000-0000-0000-0000-000000000000' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Owner
75
+ ```
76
+
77
+ Demote a single user from Owner to Member in the given Microsoft 365 Group
54
78
 
55
79
  ```sh
56
80
  m365 entra m365group user set --groupId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --role Member
57
81
  ```
58
82
 
59
- Promote the specified user to owner of the given Microsoft Teams team
83
+ Demote multiple users specified by the userNames parameter from Owner to Member of the given Microsoft Teams team
60
84
 
61
85
  ```sh
62
- m365 entra teams user set --teamId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --role Owner
86
+ m365 entra teams user set --teamId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com,john.doe@contoso.onmicrosoft.com' --role Member
63
87
  ```
64
88
 
65
- Demote the specified user from owner to member in the given Microsoft Teams team
89
+ Demote multiple users specified by the ids parameter from Owner to Member in the given Microsoft Teams team
66
90
 
67
91
  ```sh
68
- m365 entra teams user set --teamId '00000000-0000-0000-0000-000000000000' --userName 'anne.matthews@contoso.onmicrosoft.com' --role Member
92
+ m365 entra teams user set --teamName 'Engineering' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Member
69
93
  ```
70
94
 
71
95
  ## Response