@pnp/cli-microsoft365 10.1.0-beta.10765f6 → 10.1.0-beta.6c6be23

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 (36) hide show
  1. package/README.md +2 -2
  2. package/allCommands.json +1 -1
  3. package/allCommandsFull.json +1 -1
  4. package/dist/Command.js +1 -1
  5. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +3 -0
  6. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +3 -0
  7. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +3 -0
  8. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +21 -6
  9. package/dist/m365/entra/commands/m365group/m365group-get.js +29 -7
  10. package/dist/m365/entra/commands/m365group/m365group-remove.js +21 -9
  11. package/dist/m365/entra/commands/m365group/m365group-renew.js +19 -7
  12. package/dist/m365/entra/commands/m365group/m365group-teamify.js +12 -21
  13. package/dist/m365/graph/commands/subscription/subscription-add.js +46 -5
  14. package/dist/m365/spo/commands/contenttype/contenttype-get.js +2 -2
  15. package/dist/m365/spo/commands/contenttype/contenttype-list.js +6 -3
  16. package/dist/m365/spo/commands/list/list-contenttype-list.js +5 -2
  17. package/dist/m365/viva/commands/engage/engage-community-set.js +111 -0
  18. package/dist/m365/viva/commands.js +1 -0
  19. package/dist/utils/entraGroup.js +18 -0
  20. package/docs/docs/cmd/entra/m365group/m365group-conversation-list.mdx +12 -3
  21. package/docs/docs/cmd/entra/m365group/m365group-get.mdx +29 -5
  22. package/docs/docs/cmd/entra/m365group/m365group-remove.mdx +7 -4
  23. package/docs/docs/cmd/entra/m365group/m365group-renew.mdx +11 -2
  24. package/docs/docs/cmd/entra/m365group/m365group-teamify.mdx +12 -3
  25. package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +2 -2
  26. package/docs/docs/cmd/entra/m365group/m365group-user-list.mdx +6 -0
  27. package/docs/docs/cmd/entra/m365group/m365group-user-remove.mdx +1 -1
  28. package/docs/docs/cmd/entra/m365group/m365group-user-set.mdx +3 -3
  29. package/docs/docs/cmd/graph/subscription/subscription-add.mdx +30 -5
  30. package/docs/docs/cmd/login.mdx +45 -44
  31. package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +1 -1
  32. package/docs/docs/cmd/spo/contenttype/contenttype-get.mdx +7 -1
  33. package/docs/docs/cmd/spo/contenttype/contenttype-list.mdx +7 -1
  34. package/docs/docs/cmd/spo/list/list-contenttype-list.mdx +7 -1
  35. package/docs/docs/cmd/viva/engage/engage-community-set.mdx +61 -0
  36. package/package.json +2 -2
@@ -0,0 +1,111 @@
1
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
+ };
6
+ var _VivaEngageCommunitySetCommand_instances, _VivaEngageCommunitySetCommand_initTelemetry, _VivaEngageCommunitySetCommand_initOptions, _VivaEngageCommunitySetCommand_initValidators, _VivaEngageCommunitySetCommand_initTypes, _VivaEngageCommunitySetCommand_initOptionSets;
7
+ import request from '../../../../request.js';
8
+ import { validation } from '../../../../utils/validation.js';
9
+ import { vivaEngage } from '../../../../utils/vivaEngage.js';
10
+ import GraphCommand from '../../../base/GraphCommand.js';
11
+ import commands from '../../commands.js';
12
+ class VivaEngageCommunitySetCommand extends GraphCommand {
13
+ get name() {
14
+ return commands.ENGAGE_COMMUNITY_SET;
15
+ }
16
+ get description() {
17
+ return 'Updates an existing Viva Engage community';
18
+ }
19
+ constructor() {
20
+ super();
21
+ _VivaEngageCommunitySetCommand_instances.add(this);
22
+ this.privacyOptions = ['public', 'private'];
23
+ __classPrivateFieldGet(this, _VivaEngageCommunitySetCommand_instances, "m", _VivaEngageCommunitySetCommand_initTelemetry).call(this);
24
+ __classPrivateFieldGet(this, _VivaEngageCommunitySetCommand_instances, "m", _VivaEngageCommunitySetCommand_initOptions).call(this);
25
+ __classPrivateFieldGet(this, _VivaEngageCommunitySetCommand_instances, "m", _VivaEngageCommunitySetCommand_initValidators).call(this);
26
+ __classPrivateFieldGet(this, _VivaEngageCommunitySetCommand_instances, "m", _VivaEngageCommunitySetCommand_initTypes).call(this);
27
+ __classPrivateFieldGet(this, _VivaEngageCommunitySetCommand_instances, "m", _VivaEngageCommunitySetCommand_initOptionSets).call(this);
28
+ }
29
+ async commandAction(logger, args) {
30
+ let communityId = args.options.id;
31
+ if (args.options.displayName) {
32
+ communityId = (await vivaEngage.getCommunityByDisplayName(args.options.displayName, ['id'])).id;
33
+ }
34
+ else if (args.options.entraGroupId) {
35
+ communityId = (await vivaEngage.getCommunityByEntraGroupId(args.options.entraGroupId, ['id'])).id;
36
+ }
37
+ if (this.verbose) {
38
+ await logger.logToStderr(`Updating Viva Engage community with ID ${communityId}...`);
39
+ }
40
+ const requestOptions = {
41
+ url: `${this.resource}/v1.0/employeeExperience/communities/${communityId}`,
42
+ headers: {
43
+ accept: 'application/json;odata.metadata=none'
44
+ },
45
+ responseType: 'json',
46
+ data: {
47
+ description: args.options.description,
48
+ displayName: args.options.newDisplayName,
49
+ privacy: args.options.privacy
50
+ }
51
+ };
52
+ try {
53
+ await request.patch(requestOptions);
54
+ }
55
+ catch (err) {
56
+ this.handleRejectedODataJsonPromise(err);
57
+ }
58
+ }
59
+ }
60
+ _VivaEngageCommunitySetCommand_instances = new WeakSet(), _VivaEngageCommunitySetCommand_initTelemetry = function _VivaEngageCommunitySetCommand_initTelemetry() {
61
+ this.telemetry.push((args) => {
62
+ Object.assign(this.telemetryProperties, {
63
+ id: typeof args.options.id !== 'undefined',
64
+ displayName: typeof args.options.displayName !== 'undefined',
65
+ entraGroupId: typeof args.options.entraGroupId !== 'undefined',
66
+ newDisplayName: typeof args.options.newDisplayName !== 'undefined',
67
+ description: typeof args.options.description !== 'undefined',
68
+ privacy: typeof args.options.privacy !== 'undefined'
69
+ });
70
+ });
71
+ }, _VivaEngageCommunitySetCommand_initOptions = function _VivaEngageCommunitySetCommand_initOptions() {
72
+ this.options.unshift({
73
+ option: '-i, --id [id]'
74
+ }, {
75
+ option: '-d, --displayName [displayName]'
76
+ }, {
77
+ option: '--entraGroupId [entraGroupId]'
78
+ }, {
79
+ option: '--newDisplayName [newDisplayName]'
80
+ }, {
81
+ option: '--description [description]'
82
+ }, {
83
+ option: '--privacy [privacy]',
84
+ autocomplete: this.privacyOptions
85
+ });
86
+ }, _VivaEngageCommunitySetCommand_initValidators = function _VivaEngageCommunitySetCommand_initValidators() {
87
+ this.validators.push(async (args) => {
88
+ if (args.options.entraGroupId && !validation.isValidGuid(args.options.entraGroupId)) {
89
+ return `${args.options.entraGroupId} is not a valid GUID for the option 'entraGroupId'.`;
90
+ }
91
+ if (args.options.newDisplayName && args.options.newDisplayName.length > 255) {
92
+ return `The maximum amount of characters for 'newDisplayName' is 255.`;
93
+ }
94
+ if (args.options.description && args.options.description.length > 1024) {
95
+ return `The maximum amount of characters for 'description' is 1024.`;
96
+ }
97
+ if (args.options.privacy && this.privacyOptions.map(x => x.toLowerCase()).indexOf(args.options.privacy.toLowerCase()) === -1) {
98
+ return `${args.options.privacy} is not a valid privacy. Allowed values are ${this.privacyOptions.join(', ')}`;
99
+ }
100
+ if (!args.options.newDisplayName && !args.options.description && !args.options.privacy) {
101
+ return 'Specify at least newDisplayName, description, or privacy.';
102
+ }
103
+ return true;
104
+ });
105
+ }, _VivaEngageCommunitySetCommand_initTypes = function _VivaEngageCommunitySetCommand_initTypes() {
106
+ this.types.string.push('id', 'displayName', 'entraGroupId', 'newDisplayName', 'description', 'privacy');
107
+ }, _VivaEngageCommunitySetCommand_initOptionSets = function _VivaEngageCommunitySetCommand_initOptionSets() {
108
+ this.optionSets.push({ options: ['id', 'displayName', 'entraGroupId'] });
109
+ };
110
+ export default new VivaEngageCommunitySetCommand();
111
+ //# sourceMappingURL=engage-community-set.js.map
@@ -4,6 +4,7 @@ export default {
4
4
  ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
5
5
  ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
6
6
  ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
7
+ ENGAGE_COMMUNITY_SET: `${prefix} engage community set`,
7
8
  ENGAGE_COMMUNITY_USER_LIST: `${prefix} engage community user list`,
8
9
  ENGAGE_GROUP_LIST: `${prefix} engage group list`,
9
10
  ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
@@ -60,6 +60,24 @@ export const entraGroup = {
60
60
  }
61
61
  return groups[0].id;
62
62
  },
63
+ /**
64
+ * Get id of a group by its mail nickname.
65
+ * @param mailNickname Group mail nickname.
66
+ * @throws Error when group was not found.
67
+ * @throws Error when multiple groups with the same name were found.
68
+ */
69
+ async getGroupIdByMailNickname(mailNickname) {
70
+ const groups = await odata.getAllItems(`${graphResource}/v1.0/groups?$filter=mailNickname eq '${formatting.encodeQueryParameter(mailNickname)}'&$select=id`);
71
+ if (!groups.length) {
72
+ throw Error(`The specified group '${mailNickname}' does not exist.`);
73
+ }
74
+ if (groups.length > 1) {
75
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', groups);
76
+ const result = await cli.handleMultipleResultsFound(`Multiple groups with mail nickname '${mailNickname}' found.`, resultAsKeyValuePair);
77
+ return result.id;
78
+ }
79
+ return groups[0].id;
80
+ },
63
81
  async setGroup(id, isPrivate, logger, verbose) {
64
82
  if (verbose && logger) {
65
83
  await logger.logToStderr(`Updating Microsoft 365 Group ${id}...`);
@@ -15,20 +15,29 @@ m365 entra m365group conversation list [options]
15
15
  ## Options
16
16
 
17
17
  ```md definition-list
18
- `-i, --groupId <groupId>`
19
- : The ID of the Microsoft 365 group
18
+ `-i, --groupId [groupId]`
19
+ : The ID of the Microsoft 365 Group. Specify either `groupId` or `groupName`, but not both.
20
+
21
+ `-n, --groupName [groupName]`
22
+ : Display name of the Microsoft 365 Group. Specify either `groupId` or `groupName`, but not both.
20
23
  ```
21
24
 
22
25
  <Global />
23
26
 
24
27
  ## Examples
25
28
 
26
- Lists conversations for the specified Microsoft 365 group
29
+ Lists conversations for the Microsoft 365 group specified by id.
27
30
 
28
31
  ```sh
29
32
  m365 entra m365group conversation list --groupId '00000000-0000-0000-0000-000000000000'
30
33
  ```
31
34
 
35
+ Lists conversations for the Microsoft 365 group specified by displayName.
36
+
37
+ ```sh
38
+ m365 entra m365group conversation list --groupName Finance
39
+ ```
40
+
32
41
  ## Response
33
42
 
34
43
  <Tabs>
@@ -15,8 +15,11 @@ m365 entra m365group get [options]
15
15
  ## Options
16
16
 
17
17
  ```md definition-list
18
- `-i, --id <id>`
19
- : The ID of the Microsoft 365 Group or Microsoft Teams team to retrieve information for
18
+ `-i, --id [id]`
19
+ : The ID of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
20
+
21
+ `-n, --displayName [displayName]`
22
+ : Display name of the Microsoft 365 Group or Microsoft Teams team to retrieve information for. Specify either `id` or `displayName`, but not both.
20
23
 
21
24
  `--includeSiteUrl`
22
25
  : Set to retrieve the site URL for the group
@@ -32,6 +35,12 @@ Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-9
32
35
  m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844
33
36
  ```
34
37
 
38
+ Get information about the Microsoft 365 Group with displayName _Finance_
39
+
40
+ ```sh
41
+ m365 entra m365group get --displayName Finance
42
+ ```
43
+
35
44
  Get information about the Microsoft 365 Group with id _1caf7dcd-7e83-4c3a-94f7-932a1299c844_ and also retrieve the URL of the corresponding SharePoint site
36
45
 
37
46
  ```sh
@@ -80,7 +89,12 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
80
89
  "securityIdentifier": "S-1-12-1-4288263055-1337657931-1773679776-1830684296",
81
90
  "theme": null,
82
91
  "visibility": "Public",
83
- "onPremisesProvisioningErrors": []
92
+ "onPremisesProvisioningErrors": [],
93
+ "allowExternalSenders": false,
94
+ "autoSubscribeNewMembers": false,
95
+ "isSubscribedByMail": false,
96
+ "hideFromOutlookClients": false,
97
+ "hideFromAddressLists": false
84
98
  }
85
99
  ```
86
100
 
@@ -88,6 +102,8 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
88
102
  <TabItem value="Text">
89
103
 
90
104
  ```text
105
+ allowExternalSenders : false
106
+ autoSubscribeNewMembers : false
91
107
  classification : null
92
108
  createdDateTime : 2023-06-01T20:18:30Z
93
109
  creationOptions : []
@@ -96,8 +112,11 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
96
112
  displayName : Finance
97
113
  expirationDateTime : null
98
114
  groupTypes : ["Unified"]
115
+ hideFromAddressLists : false
116
+ hideFromOutlookClients : false
99
117
  id : ff99b38f-0a4b-4fbb-a034-b86988061e6d
100
118
  isAssignableToRole : null
119
+ isSubscribedByMail : false
101
120
  mail : finance@contoso.onmicrosoft.com
102
121
  mailEnabled : true
103
122
  mailNickname : finance
@@ -126,8 +145,8 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
126
145
  <TabItem value="CSV">
127
146
 
128
147
  ```csv
129
- id,createdDateTime,description,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility
130
- ff99b38f-0a4b-4fbb-a034-b86988061e6d,2023-06-01T20:18:30Z,"This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",Finance,finance@contoso.onmicrosoft.com,1,finance,2023-06-01T20:18:30Z,,S-1-12-1-4288263055-1337657931-1773679776-1830684296,Public
148
+ id,createdDateTime,description,displayName,mail,mailEnabled,mailNickname,renewedDateTime,securityEnabled,securityIdentifier,visibility,allowExternalSenders,autoSubscribeNewMembers,isSubscribedByMail,hideFromOutlookClients,hideFromAddressLists
149
+ ff99b38f-0a4b-4fbb-a034-b86988061e6d,2023-06-01T20:18:30Z,"This is the Contoso Finance Group. Please come here and check out the latest news, posts, files, and more.",Finance,finance@contoso.onmicrosoft.com,1,finance,2023-06-01T20:18:30Z,,S-1-12-1-4288263055-1337657931-1773679776-1830684296,Public,false,false,false,false,false
131
150
  ```
132
151
 
133
152
  </TabItem>
@@ -153,6 +172,11 @@ m365 entra m365group get --id 1caf7dcd-7e83-4c3a-94f7-932a1299c844 --includeSite
153
172
  securityEnabled | false
154
173
  securityIdentifier | S-1-12-1-4288263055-1337657931-1773679776-1830684296
155
174
  visibility | Public
175
+ allowExternalSenders | false
176
+ autoSubscribeNewMembers | false
177
+ isSubscribedByMail | false
178
+ hideFromOutlookClients | false
179
+ hideFromAddressLists | false
156
180
  ```
157
181
 
158
182
  </TabItem>
@@ -13,8 +13,11 @@ m365 entra m365group remove [options]
13
13
  ## Options
14
14
 
15
15
  ```md definition-list
16
- `-i, --id <id>`
17
- : The ID of the Microsoft 365 Group to remove
16
+ `-i, --id [id]`
17
+ : The ID of the Microsoft 365 Group to remove. Specify either `id` or `displayName`, but not both.
18
+
19
+ `-n, --displayName [displayName]`
20
+ : Display name of the Microsoft 365 Group to remove. Specify either `id` or `displayName`, but not both.
18
21
 
19
22
  `-f, --force`
20
23
  : Don't prompt for confirming removing the group
@@ -47,10 +50,10 @@ Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_. Will prompt for con
47
50
  m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848
48
51
  ```
49
52
 
50
- Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_ without prompting for confirmation
53
+ Remove group with displayName _Finance_ without prompting for confirmation
51
54
 
52
55
  ```sh
53
- m365 entra m365group remove --id 28beab62-7540-4db1-a23f-29a6018a3848 --force
56
+ m365 entra m365group remove --displayName Finance --force
54
57
  ```
55
58
 
56
59
  Remove group with id _28beab62-7540-4db1-a23f-29a6018a3848_ without prompting for confirmation and without moving it to the Recycle Bin
@@ -13,8 +13,11 @@ m365 entra m365group renew [options]
13
13
  ## Options
14
14
 
15
15
  ```md definition-list
16
- `-i, --id <id>`
17
- : The ID of the Microsoft 365 group to renew
16
+ `-i, --id [id]`
17
+ : The ID of the Microsoft 365 group to renew. Specify either `id` or `displayName`, but not both.
18
+
19
+ `-n, --displayName [displayName]`
20
+ : Display name of the Microsoft 365 Group to renew. Specify either `id` or `displayName`, but not both.
18
21
  ```
19
22
 
20
23
  <Global />
@@ -31,6 +34,12 @@ Renew the Microsoft 365 group with id _28beab62-7540-4db1-a23f-29a6018a3848_
31
34
  m365 entra m365group renew --id 28beab62-7540-4db1-a23f-29a6018a3848
32
35
  ```
33
36
 
37
+ Renew the Microsoft 365 group with displayName _Finance_
38
+
39
+ ```sh
40
+ m365 entra m365group renew --displayName Finance
41
+ ```
42
+
34
43
  ## Response
35
44
 
36
45
  The command won't return a response on success.
@@ -14,10 +14,13 @@ m365 entra m365group teamify [options]
14
14
 
15
15
  ```md definition-list
16
16
  `-i, --id [id]`
17
- : The ID of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id` or `mailNickname` but not both.
17
+ : The ID of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
18
+
19
+ `-n, --displayName [displayName]`
20
+ : Display name of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
18
21
 
19
22
  `--mailNickname [mailNickname]`
20
- : The mail alias of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id` or `mailNickname` but not both.
23
+ : The mail alias of the Microsoft 365 Group to connect to Microsoft Teams. Specify either `id`, `displayName` or `mailNickname`, but not multiple.
21
24
  ```
22
25
 
23
26
  <Global />
@@ -30,7 +33,13 @@ Creates a new Microsoft Teams team under existing Microsoft 365 group with the s
30
33
  m365 entra m365group teamify --id e3f60f99-0bad-481f-9e9f-ff0f572fbd03
31
34
  ```
32
35
 
33
- Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified mailNickname.
36
+ Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified displayName.
37
+
38
+ ```sh
39
+ m365 entra m365group teamify --displayName Finance
40
+ ```
41
+
42
+ Creates a new Microsoft Teams team under existing Microsoft 365 group with the specified mailNickname._
34
43
 
35
44
  ```sh
36
45
  m365 entra m365group teamify --mailNickname GroupName
@@ -13,7 +13,7 @@ m365 entra m365group user add [options]
13
13
  ## Alias
14
14
 
15
15
  ```sh
16
- m365 teams user add
16
+ m365 teams user add [options]
17
17
  ```
18
18
 
19
19
  ## Options
@@ -38,7 +38,7 @@ m365 teams user add
38
38
  : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
39
39
 
40
40
  `-r, --role [role]`
41
- : The role to be assigned to the new user: `Owner,Member`. Default `Member`.
41
+ : The role to be assigned to the new user. Allowed values: `Owner`, `Member`. Default `Member`.
42
42
  ```
43
43
 
44
44
  <Global />
@@ -57,6 +57,12 @@ List specific properties for all group users from a group specified by ID.
57
57
  m365 entra m365group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe --properties "id,jobTitle,companyName,accountEnabled"
58
58
  ```
59
59
 
60
+ List all group members that are guest users.
61
+
62
+ ```sh
63
+ m365 entra m365group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
64
+ ```
65
+
60
66
  ## Response
61
67
 
62
68
  <Tabs>
@@ -17,7 +17,7 @@ m365 entra m365group user remove [options]
17
17
  : The ID of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
18
18
 
19
19
  `--groupName [groupName]`
20
- : The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`..
20
+ : The display name of the Microsoft 365 group. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
21
21
 
22
22
  `--teamId [teamId]`
23
23
  : The ID of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
@@ -32,7 +32,7 @@ m365 entra m365group user set [options]
32
32
  : The user principal names of users. You can also pass a comma-separated list of UPNs. Specify only one of the following `ids` or `userNames`.
33
33
 
34
34
  `-r, --role <role>`
35
- : Role to set for the given user in the specified Microsoft 365 Group or Microsoft Teams team. Allowed values: `Owner`, `Member`
35
+ : Role to set for the given user in the specified Microsoft 365 Group or Microsoft Teams team. Allowed values: `Owner`, `Member`.
36
36
  ```
37
37
 
38
38
  <Global />
@@ -70,13 +70,13 @@ m365 entra m365group user set --groupId '00000000-0000-0000-0000-000000000000' -
70
70
  Demote multiple users specified by the userNames parameter from Owner to Member of the given Microsoft Teams team
71
71
 
72
72
  ```sh
73
- m365 entra teams user set --teamId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com,john.doe@contoso.onmicrosoft.com' --role Member
73
+ m365 teams user set --teamId '00000000-0000-0000-0000-000000000000' --userNames 'anne.matthews@contoso.onmicrosoft.com,john.doe@contoso.onmicrosoft.com' --role Member
74
74
  ```
75
75
 
76
76
  Demote multiple users specified by the ids parameter from Owner to Member in the given Microsoft Teams team
77
77
 
78
78
  ```sh
79
- m365 entra teams user set --teamName 'Engineering' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Member
79
+ m365 teams user set --teamName 'Engineering' --ids '74a3b772-3122-447b-b9da-10895e238219,dd3d21e4-a142-46b9-8482-bca8fe9596b3' --role Member
80
80
  ```
81
81
 
82
82
  ## Response
@@ -29,6 +29,24 @@ m365 graph subscription add [options]
29
29
 
30
30
  `-s, --clientState [clientState]`
31
31
  : The value of the clientState property sent by the service in each notification. The maximum length is 128 characters.
32
+
33
+ `--lifecycleNotificationUrl [lifecycleNotificationUrl]`
34
+ : The URL of the endpoint that will receive the lifecycle notifications. This URL must use the HTTPS protocol.
35
+
36
+ `--notificationUrlAppId [notificationUrlAppId]`
37
+ : The app ID that the subscription service can use to generate the validation token. The value allows the client to validate the authenticity of the notification received.
38
+
39
+ `--latestTLSVersion [latestTLSVersion]`
40
+ : The latest version of TLS that the notification endpoint supports. Allowed values are `v1_0`, `v1_1`, `v1_2`, `v1_3`. Default is `v1_2`.
41
+
42
+ `--includeResourceData`
43
+ : When set, the change notifications will include the changed resource data.
44
+
45
+ `--encryptionCertificate [encryptionCertificate]`
46
+ : A base64-encoded representation of a certificate with a public key used to encrypt resource data in change notifications. Required when using `includeResourceData`.
47
+
48
+ `--encryptionCertificateId [encryptionCertificateId]`
49
+ : A custom app-provided identifier to help identify the certificate needed to decrypt resource data. Required when using `includeResourceData`.
32
50
  ```
33
51
 
34
52
  <Global />
@@ -47,6 +65,13 @@ To subscribe to change notifications of Outlook contacts, events, or messages in
47
65
  - Use the corresponding application permission to subscribe to changes of items in a folder or mailbox of any user in the tenant.
48
66
  - Do not use the Outlook sharing permissions (Contacts.Read.Shared, Calendars.Read.Shared, Mail.Read.Shared, and their read/write counterparts), as they do not support subscribing to change notifications on items in shared or delegated folders.
49
67
 
68
+ :::info
69
+
70
+ For subscribers whose notification endpoint supports a version lower than the currently recommended version (TLS 1.2), specifying this property by a set timeline allows them to temporarily use their deprecated version of TLS before completing their upgrade to TLS 1.2.
71
+ For these subscribers, not setting this property per the timeline would result in subscription operations failing.
72
+
73
+ :::
74
+
50
75
  ## Examples
51
76
 
52
77
  Create a subscription
@@ -55,16 +80,16 @@ Create a subscription
55
80
  m365 graph subscription add --resource "me/mailFolders('Inbox')/messages" --changeTypes "updated" --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --expirationDateTime "2016-11-20T18:23:45.935Z" --clientState "secretClientState"
56
81
  ```
57
82
 
58
- Create a subscription on multiple change types
83
+ Create a subscription on multiple change types and include resource data
59
84
 
60
85
  ```sh
61
- m365 graph subscription add --resource groups --changeTypes "updated,deleted" --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --expirationDateTime "2016-11-20T18:23:45.935Z" --clientState "secretClientState"
86
+ m365 graph subscription add --resource "me/messages" --changeTypes "updated,deleted" --includeResourceData --encryptionCertificate 'Q0xJIGZvciBNaWNyb3NvZnQgMzY1' --encryptionCertificateId 'myCert' --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --expirationDateTime "2016-11-20T18:23:45.935Z" --clientState "secretClientState"
62
87
  ```
63
88
 
64
89
  Create a subscription using the maximum allowed expiration for Group resources
65
90
 
66
91
  ```sh
67
- m365 graph subscription add --resource groups --changeTypes "updated" --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient"
92
+ m365 graph subscription add --resource groups --changeTypes "updated" --notificationUrl "https://webhook.azurewebsites.net/api/send/myNotifyClient" --lifecycleNotificationUrl "https://webhook.azurewebsites.net/api/send/lifecycleNotifications"
68
93
  ```
69
94
 
70
95
  Create a subscription for Event Hub location if you are using Key Vault
@@ -79,10 +104,10 @@ Create a subscription for Event Hub location if you are using role-based access
79
104
  m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --notificationUrl "EventHub:https://eventHubNamespace.servicebus.windows.net/eventhubname/eventHubName?tenantId=contoso.com"
80
105
  ```
81
106
 
82
- Create a subscription for Event Grid Partner Topic.
107
+ Create a subscription for Event Grid Partner Topic and use TLS 1.3
83
108
 
84
109
  ```sh
85
- m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --notificationUrl "EventGrid:?azuresubscriptionid=8A8A8A8A-4B4B-4C4C-4D4D-12E12E12E12E&resourcegroup=resourceGroupName&partnertopic=partnerTopicName&location=partnerTopicAzureRegionName"
110
+ m365 graph subscription add --resource user --changeTypes "created,updated,deleted" --latestTLSVersion 'v1_3' --notificationUrl "EventGrid:?azuresubscriptionid=8A8A8A8A-4B4B-4C4C-4D4D-12E12E12E12E&resourcegroup=resourceGroupName&partnertopic=partnerTopicName&location=partnerTopicAzureRegionName"
86
111
  ```
87
112
 
88
113
  ## Response