@pnp/cli-microsoft365 8.0.0-beta.e6f9331 → 8.1.0-beta.3a80e6f

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 (107) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/Auth.js +10 -18
  5. package/dist/Command.js +49 -2
  6. package/dist/chili/chili.js +0 -23
  7. package/dist/cli/cli.js +61 -101
  8. package/dist/m365/commands/login.js +44 -96
  9. package/dist/m365/commands/setup.js +0 -4
  10. package/dist/m365/connection/commands/connection-remove.js +6 -2
  11. package/dist/m365/connection/commands/connection-set.js +4 -1
  12. package/dist/m365/connection/commands/connection-use.js +25 -4
  13. package/dist/m365/entra/commands/m365group/m365group-set.js +66 -29
  14. package/dist/m365/entra/commands/m365group/m365group-user-add.js +109 -32
  15. package/dist/m365/entra/commands/m365group/m365group-user-set.js +159 -84
  16. package/dist/m365/entra/commands/multitenant/MultitenantOrganization.js +2 -0
  17. package/dist/m365/entra/commands/multitenant/multitenant-add.js +65 -0
  18. package/dist/m365/entra/commands/multitenant/multitenant-get.js +32 -0
  19. package/dist/m365/entra/commands/multitenant/multitenant-remove.js +118 -0
  20. package/dist/m365/entra/commands/multitenant/multitenant-set.js +72 -0
  21. package/dist/m365/entra/commands.js +4 -0
  22. package/dist/m365/external/commands/connection/connection-doctor.js +10 -24
  23. package/dist/m365/flow/commands/flow-get.js +1 -1
  24. package/dist/m365/flow/commands/flow-list.js +2 -1
  25. package/dist/m365/graph/commands/subscription/subscription-add.js +4 -2
  26. package/dist/m365/spe/ContainerTypeProperties.js +2 -0
  27. package/dist/m365/spe/commands/containertype/containertype-list.js +49 -0
  28. package/dist/m365/spe/commands.js +2 -1
  29. package/dist/m365/spfx/commands/project/base-project-command.js +36 -126
  30. package/dist/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.js +16 -21
  31. package/dist/m365/spo/commands/commandset/commandset-get.js +31 -17
  32. package/dist/m365/spo/commands/contenttype/contenttype-field-list.js +124 -0
  33. package/dist/m365/spo/commands/field/field-list.js +1 -1
  34. package/dist/m365/spo/commands/file/file-roleassignment-add.js +1 -1
  35. package/dist/m365/spo/commands/file/file-roleinheritance-break.js +1 -1
  36. package/dist/m365/spo/commands/file/file-roleinheritance-reset.js +1 -1
  37. package/dist/m365/spo/commands/folder/folder-retentionlabel-ensure.js +1 -1
  38. package/dist/m365/spo/commands/folder/folder-sharinglink-get.js +86 -0
  39. package/dist/m365/spo/commands/folder/folder-sharinglink-list.js +110 -0
  40. package/dist/m365/spo/commands/list/ListInstance.js +6 -1
  41. package/dist/m365/spo/commands/list/list-get.js +9 -3
  42. package/dist/m365/spo/commands/list/list-roleassignment-add.js +46 -21
  43. package/dist/m365/spo/commands/list/list-roleassignment-remove.js +48 -46
  44. package/dist/m365/spo/commands/page/page-clientsidewebpart-add.js +2 -3
  45. package/dist/m365/spo/commands/page/page-text-add.js +2 -3
  46. package/dist/m365/spo/commands/spo-search.js +3 -4
  47. package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-get.js +19 -5
  48. package/dist/m365/spo/commands/tenant/tenant-commandset-get.js +20 -6
  49. package/dist/m365/spo/commands.js +3 -0
  50. package/dist/m365/teams/commands/meeting/meeting-attendancereport-get.js +119 -0
  51. package/dist/m365/teams/commands/message/message-remove.js +112 -0
  52. package/dist/m365/teams/commands.js +2 -0
  53. package/dist/m365/viva/commands/engage/engage-community-add.js +166 -0
  54. package/dist/m365/viva/commands.js +1 -0
  55. package/dist/utils/drive.js +61 -0
  56. package/dist/utils/formatting.js +30 -1
  57. package/dist/utils/spo.js +69 -6
  58. package/dist/utils/teams.js +49 -0
  59. package/dist/utils/zod.js +124 -0
  60. package/docs/docs/cmd/connection/connection-use.mdx +8 -2
  61. package/docs/docs/cmd/entra/m365group/m365group-set.mdx +37 -7
  62. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +28 -10
  63. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +35 -11
  64. package/docs/docs/cmd/entra/multitenant/multitenant-add.mdx +107 -0
  65. package/docs/docs/cmd/entra/multitenant/multitenant-get.mdx +94 -0
  66. package/docs/docs/cmd/entra/multitenant/multitenant-remove.mdx +58 -0
  67. package/docs/docs/cmd/entra/multitenant/multitenant-set.mdx +53 -0
  68. package/docs/docs/cmd/external/connection/connection-doctor.mdx +9 -9
  69. package/docs/docs/cmd/flow/flow-get.mdx +149 -283
  70. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +18 -0
  71. package/docs/docs/cmd/planner/plan/plan-remove.mdx +1 -1
  72. package/docs/docs/cmd/spe/containertype/containertype-list.mdx +102 -0
  73. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +87 -38
  74. package/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-list.mdx +22 -28
  75. package/docs/docs/cmd/spo/commandset/commandset-get.mdx +75 -24
  76. package/docs/docs/cmd/spo/commandset/commandset-list.mdx +26 -32
  77. package/docs/docs/cmd/spo/contenttype/contenttype-field-list.mdx +172 -0
  78. package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +3 -3
  79. package/docs/docs/cmd/spo/field/field-list.mdx +3 -3
  80. package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
  81. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +2 -2
  82. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +1 -1
  83. package/docs/docs/cmd/spo/file/file-roleinheritance-break.mdx +1 -1
  84. package/docs/docs/cmd/spo/file/file-roleinheritance-reset.mdx +1 -1
  85. package/docs/docs/cmd/spo/folder/folder-retentionlabel-ensure.mdx +2 -2
  86. package/docs/docs/cmd/spo/folder/folder-sharinglink-get.mdx +110 -0
  87. package/docs/docs/cmd/spo/folder/folder-sharinglink-list.mdx +114 -0
  88. package/docs/docs/cmd/spo/list/list-get.mdx +6 -0
  89. package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +15 -3
  90. package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +15 -3
  91. package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-ensure.mdx +4 -4
  92. package/docs/docs/cmd/spo/listitem/listitem-retentionlabel-remove.mdx +1 -1
  93. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +9 -9
  94. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +7 -7
  95. package/docs/docs/cmd/spo/site/site-recyclebinitem-list.mdx +1 -1
  96. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-get.mdx +79 -30
  97. package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-list.mdx +20 -19
  98. package/docs/docs/cmd/spo/tenant/tenant-commandset-get.mdx +84 -38
  99. package/docs/docs/cmd/spo/tenant/tenant-commandset-list.mdx +20 -19
  100. package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +1 -1
  101. package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +1 -1
  102. package/docs/docs/cmd/teams/meeting/meeting-attendancereport-get.mdx +138 -0
  103. package/docs/docs/cmd/teams/meeting/meeting-list.mdx +7 -3
  104. package/docs/docs/cmd/teams/message/message-remove.mdx +63 -0
  105. package/docs/docs/cmd/viva/engage/engage-community-add.mdx +168 -0
  106. package/npm-shrinkwrap.json +590 -1024
  107. package/package.json +7 -3
@@ -0,0 +1,49 @@
1
+ import { formatting } from './formatting.js';
2
+ import { odata } from './odata.js';
3
+ import { cli } from '../cli/cli.js';
4
+ const graphResource = 'https://graph.microsoft.com';
5
+ export const teams = {
6
+ /**
7
+ * Retrieve the id of a team by its name.
8
+ * @param displayName Name of the team to retrieve.
9
+ * @throws Error if the team cannot be found.
10
+ * @throws Error when multiple teams with the same name and prompting is disabled.
11
+ * @returns The ID of the team.
12
+ */
13
+ async getTeamIdByDisplayName(displayName) {
14
+ const teams = await odata.getAllItems(`${graphResource}/v1.0/teams?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'&$select=id`);
15
+ if (!teams.length) {
16
+ throw Error(`The specified team '${displayName}' does not exist.`);
17
+ }
18
+ if (teams.length > 1) {
19
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', teams);
20
+ const result = await cli.handleMultipleResultsFound(`Multiple teams with name '${displayName}' found.`, resultAsKeyValuePair);
21
+ return result.id;
22
+ }
23
+ return teams[0].id;
24
+ },
25
+ /**
26
+ * Retrieves the channel ID by its name in a Microsoft Teams team.
27
+ * @param teamId The ID of the team.
28
+ * @param name The name of the channel.
29
+ * @returns The ID of the channel.
30
+ * @throws Throws an error if the specified channel does not exist in the team.
31
+ */
32
+ async getChannelIdByDisplayName(teamId, name) {
33
+ const channelRequestOptions = {
34
+ url: `${graphResource}/v1.0/teams/${teamId}/channels?$filter=displayName eq '${formatting.encodeQueryParameter(name)}'&$select=id`,
35
+ headers: {
36
+ accept: 'application/json;odata.metadata=none'
37
+ },
38
+ responseType: 'json'
39
+ };
40
+ const response = await odata.getAllItems(channelRequestOptions);
41
+ // Only one channel can have the same name in a team
42
+ const channelItem = response[0];
43
+ if (!channelItem) {
44
+ throw Error(`The channel '${name}' does not exist in the Microsoft Teams team with ID '${teamId}'.`);
45
+ }
46
+ return channelItem.id;
47
+ }
48
+ };
49
+ //# sourceMappingURL=teams.js.map
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ function parseEffect(def, _options, _currentOption) {
3
+ return def.schema._def;
4
+ }
5
+ function parseIntersection(def, _options, _currentOption) {
6
+ if (def.left._def.typeName !== z.ZodFirstPartyTypeKind.ZodAny) {
7
+ return def.left._def;
8
+ }
9
+ if (def.right._def.typeName !== z.ZodFirstPartyTypeKind.ZodAny) {
10
+ return def.right._def;
11
+ }
12
+ return;
13
+ }
14
+ function parseObject(def, options, _currentOption) {
15
+ const properties = def.shape();
16
+ for (const key in properties) {
17
+ const property = properties[key];
18
+ const option = {
19
+ name: key,
20
+ long: key,
21
+ short: property._def.alias,
22
+ required: true,
23
+ type: 'string'
24
+ };
25
+ parseDef(property._def, options, option);
26
+ options.push(option);
27
+ }
28
+ return;
29
+ }
30
+ function parseString(_def, _options, currentOption) {
31
+ if (currentOption) {
32
+ currentOption.type = 'string';
33
+ }
34
+ return;
35
+ }
36
+ function parseNumber(_def, _options, currentOption) {
37
+ if (currentOption) {
38
+ currentOption.type = 'number';
39
+ }
40
+ return;
41
+ }
42
+ function parseBoolean(_def, _options, currentOption) {
43
+ if (currentOption) {
44
+ currentOption.type = 'boolean';
45
+ }
46
+ return;
47
+ }
48
+ function parseOptional(def, _options, currentOption) {
49
+ if (currentOption) {
50
+ currentOption.required = false;
51
+ }
52
+ return def.innerType._def;
53
+ }
54
+ function parseDefault(def, _options, currentOption) {
55
+ if (currentOption) {
56
+ currentOption.required = false;
57
+ }
58
+ return def.innerType._def;
59
+ }
60
+ function parseEnum(def, _options, currentOption) {
61
+ if (currentOption) {
62
+ currentOption.type = 'string';
63
+ currentOption.autocomplete = def.values;
64
+ }
65
+ return;
66
+ }
67
+ function parseNativeEnum(def, _options, currentOption) {
68
+ if (currentOption) {
69
+ currentOption.type = 'string';
70
+ currentOption.autocomplete = Object.getOwnPropertyNames(def.values);
71
+ }
72
+ return;
73
+ }
74
+ function getParseFn(typeName) {
75
+ switch (typeName) {
76
+ case z.ZodFirstPartyTypeKind.ZodEffects:
77
+ return parseEffect;
78
+ case z.ZodFirstPartyTypeKind.ZodObject:
79
+ return parseObject;
80
+ case z.ZodFirstPartyTypeKind.ZodOptional:
81
+ return parseOptional;
82
+ case z.ZodFirstPartyTypeKind.ZodString:
83
+ return parseString;
84
+ case z.ZodFirstPartyTypeKind.ZodNumber:
85
+ return parseNumber;
86
+ case z.ZodFirstPartyTypeKind.ZodBoolean:
87
+ return parseBoolean;
88
+ case z.ZodFirstPartyTypeKind.ZodEnum:
89
+ return parseEnum;
90
+ case z.ZodFirstPartyTypeKind.ZodNativeEnum:
91
+ return parseNativeEnum;
92
+ case z.ZodFirstPartyTypeKind.ZodDefault:
93
+ return parseDefault;
94
+ case z.ZodFirstPartyTypeKind.ZodIntersection:
95
+ return parseIntersection;
96
+ default:
97
+ return;
98
+ }
99
+ }
100
+ function parseDef(def, options, currentOption) {
101
+ let parsedDef = def;
102
+ do {
103
+ const parse = getParseFn(parsedDef.typeName);
104
+ if (!parse) {
105
+ break;
106
+ }
107
+ parsedDef = parse(parsedDef, options, currentOption);
108
+ if (!parsedDef) {
109
+ break;
110
+ }
111
+ } while (parsedDef);
112
+ }
113
+ export const zod = {
114
+ alias(alias, type) {
115
+ type._def.alias = alias;
116
+ return type;
117
+ },
118
+ schemaToOptions(schema) {
119
+ const options = [];
120
+ parseDef(schema._def, options);
121
+ return options;
122
+ }
123
+ };
124
+ //# sourceMappingURL=zod.js.map
@@ -15,7 +15,7 @@ m365 connection use [options]
15
15
  ## Options
16
16
 
17
17
  ```md definition-list
18
- `-n, --name <name>`
18
+ `-n, --name [name]`
19
19
  : The name of the connection to switch to.
20
20
  ```
21
21
 
@@ -23,7 +23,13 @@ m365 connection use [options]
23
23
 
24
24
  ## Remarks
25
25
 
26
- The value for `--name` can be found by running [m365 connection list](connection-list.mdx). You can update the name of a connection by running [m365 connection set](connection-set.mdx).
26
+ :::tip
27
+
28
+ If you haven't disabled the "prompt" setting, running this command without options will show a list of available connections. You can then select the connection to activate it.
29
+
30
+ :::
31
+
32
+ You can update the name of a connection by running [m365 connection set](connection-set.mdx).
27
33
 
28
34
  ## Examples
29
35
 
@@ -35,10 +35,22 @@ m365 aad m365group set [options]
35
35
  : Comma-separated list of Microsoft 365 Group members to add
36
36
 
37
37
  `--isPrivate [isPrivate]`
38
- : Set to true if the Microsoft 365 Group should be private and to false if it should be public (default)
38
+ : Set to `true` if the Microsoft 365 Group should be private and `false` if it should be public.
39
39
 
40
40
  `-l, --logoPath [logoPath]`
41
41
  : Local path to the image file to use as group logo
42
+
43
+ `--allowExternalSenders [allowExternalSenders]`
44
+ : Indicates if people external to the organization can send messages to the group. Valid values: `true`, `false`.
45
+
46
+ `--autoSubscribeNewMembers [autoSubscribeNewMembers]`
47
+ : Indicates if new members added to the group will be auto-subscribed to receive email notifications. Valid values: `true`, `false`.
48
+
49
+ `--hideFromAddressLists [hideFromAddressLists]`
50
+ : Indicates if the group is not displayed in certain parts of the Outlook UI: the Address Book, address lists for selecting message recipients, and the Browse Groups dialog for searching groups. Valid values: `true`, `false`.
51
+
52
+ `--hideFromOutlookClients [hideFromOutlookClients]`
53
+ : Indicates if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web. Valid values: `true`, `false`.
42
54
  ```
43
55
 
44
56
  <Global />
@@ -49,38 +61,56 @@ When updating group's owners and members, the command will add newly specified u
49
61
 
50
62
  When specifying the path to the logo image you can use both relative and absolute paths. Note, that ~ in the path, will not be resolved and will most likely result in an error.
51
63
 
64
+ :::note
65
+
66
+ Options `allowExternalSenders` and `autoSubscribeNewMembers` can only be set using delegated permissions.
67
+
68
+ :::
69
+
52
70
  ## Examples
53
71
 
54
- Update Microsoft 365 Group display name
72
+ Update Microsoft 365 Group display name.
55
73
 
56
74
  ```sh
57
75
  m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --displayName Finance
58
76
  ```
59
77
 
60
- Change Microsoft 365 Group visibility to public
78
+ Change Microsoft 365 Group visibility to public.
61
79
 
62
80
  ```sh
63
- m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate false
81
+ m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate `false`
64
82
  ```
65
83
 
66
- Add new Microsoft 365 Group owners
84
+ Add new Microsoft 365 Group owners.
67
85
 
68
86
  ```sh
69
87
  m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
70
88
  ```
71
89
 
72
- Add new Microsoft 365 Group members
90
+ Add new Microsoft 365 Group members.
73
91
 
74
92
  ```sh
75
93
  m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
76
94
  ```
77
95
 
78
- Update Microsoft 365 Group logo
96
+ Update Microsoft 365 Group logo.
79
97
 
80
98
  ```sh
81
99
  m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --logoPath images/logo.png
82
100
  ```
83
101
 
102
+ Hide the Microsoft 365 group from the address lists and the Outlook clients.
103
+
104
+ ```sh
105
+ m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --hideFromOutlookClients true --hideFromAddressLists true
106
+ ```
107
+
108
+ Auto-subscribe new members to receive email notifications and do not allow external senders to send messages to the group.
109
+
110
+ ```sh
111
+ m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --autoSubscribeNewMembers true --allowExternalSenders false
112
+ ```
113
+
84
114
  ## Response
85
115
 
86
116
  The command won't return a response on success.
@@ -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
@@ -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
@@ -0,0 +1,107 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra multitenant add
6
+
7
+ Creates a new multitenant organization
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra multitenant add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-n, --displayname <displayName>`
19
+ : Display name for the multitenant organization.
20
+
21
+ `-d, --description [description]`
22
+ : Description for the multitenant organiztion.
23
+ ```
24
+
25
+ <Global />
26
+
27
+ ## Remarks
28
+
29
+ :::info
30
+
31
+ To use this command you must be at least **Security Administrator**.
32
+
33
+ :::
34
+
35
+ ## Examples
36
+
37
+ Create a new multitenant organization with display name only.
38
+
39
+ ```sh
40
+ m365 entra multitenant add --displayName 'Contoso organization'
41
+ ```
42
+
43
+ Create a new multitenant organization with display name and description.
44
+
45
+ ```sh
46
+ m365 entra multitenant add --displayName 'Contoso organization' --description 'Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank'
47
+ ```
48
+
49
+ ## Response
50
+
51
+ <Tabs>
52
+ <TabItem value="JSON">
53
+
54
+ ```json
55
+ {
56
+ "id": "c231d4a5-138f-4bdf-9fee-f26a90ea3ad0",
57
+ "createdDateTime": "2024-05-05T05:05:05Z",
58
+ "state": "active",
59
+ "displayName": "Contoso organization",
60
+ "description": "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
61
+ }
62
+ ```
63
+
64
+ </TabItem>
65
+ <TabItem value="Text">
66
+
67
+ ```text
68
+ createdDateTime: 2024-05-05T05:05:05Z
69
+ description : Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
70
+ displayName : Contoso organization
71
+ id : c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
72
+ state : active
73
+ ```
74
+
75
+ </TabItem>
76
+ <TabItem value="CSV">
77
+
78
+ ```csv
79
+ id,createdDateTime,state,displayName,description
80
+ c231d4a5-138f-4bdf-9fee-f26a90ea3ad0,2024-05-05T05:05:05Z,active,Contoso organization,"Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
81
+ ```
82
+
83
+ </TabItem>
84
+ <TabItem value="Markdown">
85
+
86
+ ```md
87
+ # entra multitenant add
88
+
89
+ Date: 5/5/2024
90
+
91
+ ## Contoso organization (c231d4a5-138f-4bdf-9fee-f26a90ea3ad0)
92
+
93
+ Property | Value
94
+ ---------|-------
95
+ id | c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
96
+ createdDateTime | 2024-05-05T05:05:05Z
97
+ state | active
98
+ displayName | Contoso organization
99
+ description | Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
100
+ ```
101
+
102
+ </TabItem>
103
+ </Tabs>
104
+
105
+ ## More information
106
+
107
+ - Multitenant organization: https://learn.microsoft.com/entra/identity/multi-tenant-organizations/overview
@@ -0,0 +1,94 @@
1
+
2
+ import Global from '/docs/cmd/_global.mdx';
3
+ import Tabs from '@theme/Tabs';
4
+ import TabItem from '@theme/TabItem';
5
+
6
+ # entra multitenant get
7
+
8
+ Gets properties of the multitenant organization
9
+
10
+ ## Usage
11
+
12
+ ```sh
13
+ m365 entra multitenant get [options]
14
+ ```
15
+
16
+ ## Options
17
+
18
+ <Global />
19
+
20
+ ## Remarks
21
+
22
+ :::info
23
+
24
+ To use this command you must be at least **Security Administrator**.
25
+
26
+ :::
27
+
28
+ ## Examples
29
+
30
+ Gets properties of the multitenant organization
31
+
32
+ ```sh
33
+ m365 entra multitenant get
34
+ ```
35
+
36
+ ## Response
37
+
38
+ <Tabs>
39
+ <TabItem value="JSON">
40
+
41
+ ```json
42
+ {
43
+ "id": "c231d4a5-138f-4bdf-9fee-f26a90ea3ad0",
44
+ "createdDateTime": "2024-05-05T05:05:05Z",
45
+ "state": "active",
46
+ "displayName": "Contoso organization",
47
+ "description": "Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
48
+ }
49
+ ```
50
+
51
+ </TabItem>
52
+ <TabItem value="Text">
53
+
54
+ ```text
55
+ createdDateTime: 2024-05-05T05:05:05Z
56
+ description : Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
57
+ displayName : Contoso organization
58
+ id : c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
59
+ state : active
60
+ ```
61
+
62
+ </TabItem>
63
+ <TabItem value="CSV">
64
+
65
+ ```csv
66
+ id,createdDateTime,state,displayName,description
67
+ c231d4a5-138f-4bdf-9fee-f26a90ea3ad0,2024-05-05T05:05:05Z,active,Contoso organization,"Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank"
68
+ ```
69
+
70
+ </TabItem>
71
+ <TabItem value="Markdown">
72
+
73
+ ```md
74
+ # entra multitenant get
75
+
76
+ Date: 5/5/2024
77
+
78
+ ## Contoso organization (c231d4a5-138f-4bdf-9fee-f26a90ea3ad0)
79
+
80
+ Property | Value
81
+ ---------|-------
82
+ id | c231d4a5-138f-4bdf-9fee-f26a90ea3ad0
83
+ createdDateTime | 2024-05-05T05:05:05Z
84
+ state | active
85
+ displayName | Contoso organization
86
+ description | Multitenant organization between Contoso, Fabrikam, and Woodgrove Bank
87
+ ```
88
+
89
+ </TabItem>
90
+ </Tabs>
91
+
92
+ ## More information
93
+
94
+ - Multitenant organization: https://learn.microsoft.com/entra/identity/multi-tenant-organizations/overview