@pnp/cli-microsoft365 7.4.0-beta.5c123d7 → 7.4.0-beta.8d6724f

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.
@@ -4,6 +4,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
4
4
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
5
  };
6
6
  var _TeamsUserAppAddCommand_instances, _TeamsUserAppAddCommand_initTelemetry, _TeamsUserAppAddCommand_initOptions, _TeamsUserAppAddCommand_initValidators, _TeamsUserAppAddCommand_initOptionSets;
7
+ import { cli } from '../../../../cli/cli.js';
7
8
  import request from '../../../../request.js';
8
9
  import { formatting } from '../../../../utils/formatting.js';
9
10
  import { validation } from '../../../../utils/validation.js';
@@ -25,8 +26,12 @@ class TeamsUserAppAddCommand extends GraphCommand {
25
26
  __classPrivateFieldGet(this, _TeamsUserAppAddCommand_instances, "m", _TeamsUserAppAddCommand_initOptionSets).call(this);
26
27
  }
27
28
  async commandAction(logger, args) {
29
+ const appId = await this.getAppId(args);
28
30
  const userId = (args.options.userId ?? args.options.userName);
29
31
  const endpoint = `${this.resource}/v1.0`;
32
+ if (this.verbose) {
33
+ await logger.logToStderr(`Removing app with ID ${appId} for user ${args.options.userId}`);
34
+ }
30
35
  const requestOptions = {
31
36
  url: `${endpoint}/users/${formatting.encodeQueryParameter(userId)}/teamwork/installedApps`,
32
37
  headers: {
@@ -35,7 +40,7 @@ class TeamsUserAppAddCommand extends GraphCommand {
35
40
  },
36
41
  responseType: 'json',
37
42
  data: {
38
- 'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${args.options.id}`
43
+ 'teamsApp@odata.bind': `${endpoint}/appCatalogs/teamsApps/${appId}`
39
44
  }
40
45
  };
41
46
  try {
@@ -45,17 +50,43 @@ class TeamsUserAppAddCommand extends GraphCommand {
45
50
  this.handleRejectedODataJsonPromise(err);
46
51
  }
47
52
  }
53
+ async getAppId(args) {
54
+ if (args.options.id) {
55
+ return args.options.id;
56
+ }
57
+ const requestOptions = {
58
+ url: `${this.resource}/v1.0/appCatalogs/teamsApps?$filter=displayName eq '${formatting.encodeQueryParameter(args.options.name)}'`,
59
+ headers: {
60
+ accept: 'application/json;odata.metadata=none'
61
+ },
62
+ responseType: 'json'
63
+ };
64
+ const response = await request.get(requestOptions);
65
+ if (response.value.length === 1) {
66
+ return response.value[0].id;
67
+ }
68
+ if (response.value.length === 0) {
69
+ throw `The specified Teams app does not exist`;
70
+ }
71
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', response.value);
72
+ const result = (await cli.handleMultipleResultsFound(`Multiple Teams apps with name '${args.options.name}' found.`, resultAsKeyValuePair));
73
+ return result.id;
74
+ }
48
75
  }
49
76
  _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initTelemetry = function _TeamsUserAppAddCommand_initTelemetry() {
50
77
  this.telemetry.push((args) => {
51
78
  Object.assign(this.telemetryProperties, {
79
+ id: typeof args.options.id !== 'undefined',
80
+ name: typeof args.options.name !== 'undefined',
52
81
  userId: typeof args.options.userId !== 'undefined',
53
82
  userName: typeof args.options.userName !== 'undefined'
54
83
  });
55
84
  });
56
85
  }, _TeamsUserAppAddCommand_initOptions = function _TeamsUserAppAddCommand_initOptions() {
57
86
  this.options.unshift({
58
- option: '--id <id>'
87
+ option: '--id [id]'
88
+ }, {
89
+ option: '--name [name]'
59
90
  }, {
60
91
  option: '--userId [userId]'
61
92
  }, {
@@ -63,7 +94,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
63
94
  });
64
95
  }, _TeamsUserAppAddCommand_initValidators = function _TeamsUserAppAddCommand_initValidators() {
65
96
  this.validators.push(async (args) => {
66
- if (!validation.isValidGuid(args.options.id)) {
97
+ if (args.options.id && !validation.isValidGuid(args.options.id)) {
67
98
  return `${args.options.id} is not a valid GUID`;
68
99
  }
69
100
  if (args.options.userId && !validation.isValidGuid(args.options.userId)) {
@@ -75,6 +106,7 @@ _TeamsUserAppAddCommand_instances = new WeakSet(), _TeamsUserAppAddCommand_initT
75
106
  return true;
76
107
  });
77
108
  }, _TeamsUserAppAddCommand_initOptionSets = function _TeamsUserAppAddCommand_initOptionSets() {
109
+ this.optionSets.push({ options: ['id', 'name'] });
78
110
  this.optionSets.push({ options: ['userId', 'userName'] });
79
111
  };
80
112
  export default new TeamsUserAppAddCommand();
package/dist/request.js CHANGED
@@ -154,6 +154,10 @@ class Request {
154
154
  options.headers.authorization = `Bearer ${accessToken}`;
155
155
  }
156
156
  }
157
+ const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
158
+ if (proxyUrl) {
159
+ options.proxy = this.createProxyConfigFromUrl(proxyUrl);
160
+ }
157
161
  return this.req(options);
158
162
  })
159
163
  .then((res) => {
@@ -199,6 +203,18 @@ class Request {
199
203
  const cloudUrl = Auth.getEndpointForResource(hostname, cloudType);
200
204
  options.url = options.url.replace(hostname, cloudUrl);
201
205
  }
206
+ createProxyConfigFromUrl(url) {
207
+ const parsedUrl = new URL(url);
208
+ const port = parsedUrl.port || (url.toLowerCase().startsWith('https') ? 443 : 80);
209
+ let authObject = null;
210
+ if (parsedUrl.username && parsedUrl.password) {
211
+ authObject = {
212
+ username: parsedUrl.username,
213
+ password: parsedUrl.password
214
+ };
215
+ }
216
+ return { host: parsedUrl.hostname, port: Number(port), protocol: 'http', ...(authObject && { auth: authObject }) };
217
+ }
202
218
  }
203
219
  export default new Request();
204
220
  //# sourceMappingURL=request.js.map
@@ -0,0 +1,42 @@
1
+ import request from '../request.js';
2
+ const getRequestOptions = (roleDefinitionId, principalId, directoryScopeId) => ({
3
+ url: `https://graph.microsoft.com/v1.0/roleManagement/directory/roleAssignments`,
4
+ headers: {
5
+ accept: 'application/json;odata.metadata=none'
6
+ },
7
+ responseType: 'json',
8
+ data: {
9
+ roleDefinitionId: roleDefinitionId,
10
+ principalId: principalId,
11
+ directoryScopeId: directoryScopeId
12
+ }
13
+ });
14
+ /**
15
+ * Utils for RBAC.
16
+ * Supported RBAC providers:
17
+ * - Directory (Entra ID)
18
+ */
19
+ export const roleAssignment = {
20
+ /**
21
+ * Assigns a specific role to a principal with scope to an administrative unit
22
+ * @param roleDefinitionId Role which lists the actions that can be performed
23
+ * @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
24
+ * @param administrativeUnitId Administrative unit which represents a current scope for a role assignment
25
+ * @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to an administrative unit
26
+ */
27
+ async createRoleAssignmentWithAdministrativeUnitScope(roleDefinitionId, principalId, administrativeUnitId) {
28
+ const requestOptions = getRequestOptions(roleDefinitionId, principalId, `/administrativeUnits/${administrativeUnitId}`);
29
+ return await request.post(requestOptions);
30
+ },
31
+ /**
32
+ * Assigns a specific role to a principal with scope to the whole tenant
33
+ * @param roleDefinitionId Role which lists the actions that can be performed
34
+ * @param principalId Object that represents a user, group, service principal, or managed identity that is requesting access to resources
35
+ * @returns Returns unified role assignment object that represents a role definition assigned to a principal with scope to the whole tenant
36
+ */
37
+ async createRoleAssignmentWithTenantScope(roleDefinitionId, principalId) {
38
+ const requestOptions = getRequestOptions(roleDefinitionId, principalId, '/');
39
+ return await request.post(requestOptions);
40
+ }
41
+ };
42
+ //# sourceMappingURL=roleAssignment.js.map
@@ -0,0 +1,24 @@
1
+ import { cli } from '../cli/cli.js';
2
+ import { formatting } from './formatting.js';
3
+ import { odata } from './odata.js';
4
+ export const roleDefinition = {
5
+ /**
6
+ * Get a directory (Microsoft Entra) role
7
+ * @param displayName Role definition display name.
8
+ * @returns The role definition.
9
+ * @throws Error when role definition was not found.
10
+ */
11
+ async getRoleDefinitionByDisplayName(displayName) {
12
+ const roleDefinitions = await odata.getAllItems(`https://graph.microsoft.com/v1.0/roleManagement/directory/roleDefinitions?$filter=displayName eq '${formatting.encodeQueryParameter(displayName)}'`);
13
+ if (roleDefinitions.length === 0) {
14
+ throw `The specified role definition '${displayName}' does not exist.`;
15
+ }
16
+ if (roleDefinitions.length > 1) {
17
+ const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', roleDefinitions);
18
+ const selectedRoleDefinition = await cli.handleMultipleResultsFound(`Multiple role definitions with name '${displayName}' found.`, resultAsKeyValuePair);
19
+ return selectedRoleDefinition;
20
+ }
21
+ return roleDefinitions[0];
22
+ }
23
+ };
24
+ //# sourceMappingURL=roleDefinition.js.map
@@ -0,0 +1,116 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+ import Tabs from '@theme/Tabs';
3
+ import TabItem from '@theme/TabItem';
4
+
5
+ # entra administrativeunit roleassignment add
6
+
7
+ Assigns a Microsoft Entra role with administrative unit scope to a user
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ m365 entra administrativeunit roleassignment add [options]
13
+ ```
14
+
15
+ ## Options
16
+
17
+ ```md definition-list
18
+ `-i, --administrativeUnitId [administrativeUnitId]`
19
+ : The id of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
20
+
21
+ `-n, --administrativeUnitName [administrativeUnitName]`
22
+ : The name of the administrative unit. Specify either `administrativeUnitId` or `administrativeUnitName`.
23
+
24
+ `--roleDefinitionId [roleDefinitionId]`
25
+ : The id of the role definition that the member is in. Specify either `roleDefinitionId` or `roleDefinitionName`.
26
+
27
+ `--roleDefinitionName [roleDefinitionName]`
28
+ : The name of the role definition that the member is in. Specify either `roleDefinitionId` or `roleDefinitionName`.
29
+
30
+ `--userId [userId]`
31
+ : The id of the user that is a member of the scoped role. Specify either `userId` or `userName`.
32
+
33
+ `--userName [userName]`
34
+ : The name of the user that is a member of the scoped role. Specify either `userId` or `userName`.
35
+ ```
36
+
37
+ <Global />
38
+
39
+ ## Remarks
40
+
41
+ :::info
42
+
43
+ To use this command you must be either **Global Administrator** or **Privileged Role Administrator**.
44
+
45
+ :::
46
+
47
+ ## Examples
48
+
49
+ Assign a role definition specified by id to a user specified by id for an administrative unit specified by id
50
+
51
+ ```sh
52
+ m365 entra administrativeunit roleassignment add --administrativeUnitId 81bb36e4-f4c6-4984-8e56-d4f8feae9e09 --roleDefinitionId 4d6ac14f-3453-41d0-bef9-a3e0c569773a --userId 5f91f951-7305-4a27-9b63-7b00906de09f
53
+ ```
54
+
55
+ Assign a role definition specified by name to a user specified by name for an administrative unit specified by name
56
+
57
+ ```sh
58
+ m365 entra administrativeunit roleassignment add --administrativeUnitName 'Marketing Division' --roleDefinitionName 'License Administrator' --userName 'john.doe@contoso.com'
59
+ ```
60
+
61
+ ## Response
62
+
63
+ <Tabs>
64
+ <TabItem value="JSON">
65
+
66
+ ```json
67
+ {
68
+ "id": "5wuT_mJe20eRr5jDpJo4sVH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2",
69
+ "principalId": "5f91f951-7305-4a27-9b63-7b00906de09f",
70
+ "directoryScopeId": "/administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09",
71
+ "roleDefinitionId": "4d6ac14f-3453-41d0-bef9-a3e0c569773a"
72
+ }
73
+ ```
74
+
75
+ </TabItem>
76
+ <TabItem value="Text">
77
+
78
+ ```text
79
+ directoryScopeId: /administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09
80
+ id : 4yeYchSc90m7G5YI8Va7uFH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2
81
+ principalId : 5f91f951-7305-4a27-9b63-7b00906de09f
82
+ roleDefinitionId: 4d6ac14f-3453-41d0-bef9-a3e0c569773a
83
+ ```
84
+
85
+ </TabItem>
86
+ <TabItem value="CSV">
87
+
88
+ ```csv
89
+ id,principalId,directoryScopeId,roleDefinitionId
90
+ UB-K8uf2cUWBi2oS8q9rbFH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2,5f91f951-7305-4a27-9b63-7b00906de09f,/administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09,4d6ac14f-3453-41d0-bef9-a3e0c569773a
91
+ ```
92
+
93
+ </TabItem>
94
+ <TabItem value="Markdown">
95
+
96
+ ```md
97
+ # entra administrativeunit roleassignment add --administrativeUnitId "81bb36e4-f4c6-4984-8e56-d4f8feae9e09" --roleDefinitionId "4d6ac14f-3453-41d0-bef9-a3e0c569773a" --userId "5f91f951-7305-4a27-9b63-7b00906de09f"
98
+
99
+ Date: 11/16/2023
100
+
101
+ ## T8FqTVM00EG--aPgxWl3OlH5kV8FcydKm2N7AJBt4J_kNruBxvSESY5W1Pj-rp4J-2
102
+
103
+ Property | Value
104
+ ---------|-------
105
+ id | T8FqTVM00EG--aPgxWl3OlH5kV8FcydKm2N7AJBt4J\_kNruBxvSESY5W1Pj-rp4J-2
106
+ principalId | 5f91f951-7305-4a27-9b63-7b00906de09f
107
+ directoryScopeId | /administrativeUnits/81bb36e4-f4c6-4984-8e56-d4f8feae9e09
108
+ roleDefinitionId | 4d6ac14f-3453-41d0-bef9-a3e0c569773a
109
+ ```
110
+
111
+ </TabItem>
112
+ </Tabs>
113
+
114
+ ## More information
115
+
116
+ - [Roles with administrative unit scope](https://learn.microsoft.com/entra/identity/role-based-access-control/admin-units-assign-roles#roles-that-can-be-assigned-with-administrative-unit-scope)
@@ -0,0 +1,47 @@
1
+ import Global from '/docs/cmd/_global.mdx';
2
+
3
+ # external connection urltoitemresolver add
4
+
5
+ Adds a URL to item resolver to an external connection
6
+
7
+ ## Usage
8
+
9
+ ```sh
10
+ m365 external connection urltoitemresolver add [options]
11
+ ```
12
+
13
+ ## Options
14
+
15
+ ```md definition-list
16
+ `-c, --externalConnectionId <externalConnectionId>`
17
+ : The ID of the external connection to which to add the resolver
18
+
19
+ `--baseUrls <baseUrls>`
20
+ : Comma-separated list of base URLs
21
+
22
+ `--urlPattern <urlPattern>`
23
+ : Regex pattern to match URLs
24
+
25
+ `-i, --itemId <itemId>`
26
+ : Pattern that matches captured matches from the URL with the external item ID
27
+
28
+ `-p, --priority <priority>`
29
+ : Integer that defines the resolution order
30
+ ```
31
+ <Global />
32
+
33
+ ## Examples
34
+
35
+ Adds a URL to item resolver to an existing connection
36
+
37
+ ```sh
38
+ m365 external connection urltoitemresolver add --externalConnectionId "samplesolutiongallery" --baseUrls "https://adoption.microsoft.com" --urlPattern "/sample-solution-gallery/sample/(?<sampleId>[^/]+)" --itemId "{sampleId}" --priority 1
39
+ ```
40
+
41
+ ## Response
42
+
43
+ The command won't return a response on success.
44
+
45
+ ## More information
46
+
47
+ - Microsoft Graph external connection activitySettings: [https://learn.microsoft.com/graph/api/resources/externalconnectors-activitysettings?view=graph-rest-1.0](https://learn.microsoft.com/graph/api/resources/externalconnectors-activitysettings?view=graph-rest-1.0)
@@ -25,7 +25,14 @@ m365 flow run get [options]
25
25
  : The name of the environment where the flow is located
26
26
 
27
27
  `--includeTriggerInformation`
28
+ : (deprecated. Use option `withTrigger` instead) If specified, include information about the trigger details
29
+
30
+ `--withTrigger`
28
31
  : If specified, include information about the trigger details
32
+
33
+ `--withActions [withActions]`
34
+ : If specified, include information about all actions when no action names are specified, or provide a specified list of actions separated by commas to include only the relevant action details
35
+
29
36
  ```
30
37
 
31
38
  <Global />
@@ -44,7 +51,7 @@ If the Microsoft Flow with the name you specified doesn't exist, you will get th
44
51
 
45
52
  If the run with the name you specified doesn't exist, you will get the `The provided workflow run name is not valid.` error.
46
53
 
47
- If the option `includeTriggerInformation` is specified, but the trigger does not contain an outputsLink such as for example with a `Recurrence` trigger, this option will be ignored.
54
+ If the option `withTrigger` is specified, but the trigger does not contain an outputsLink such as for example with a `Recurrence` trigger, this option will be ignored.
48
55
 
49
56
  ## Examples
50
57
 
@@ -57,7 +64,19 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
57
64
  Get information about the given run of the specified Power Automate flow including trigger information
58
65
 
59
66
  ```sh
60
- m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --includeTriggerInformation
67
+ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withTrigger
68
+ ```
69
+
70
+ Get information about the given run of the specified Power Automate flow including details about all associated actions.
71
+
72
+ ```sh
73
+ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withActions
74
+ ```
75
+
76
+ Get information about the given run of the specified Power Automate flow including exclusively the details of 'Action_Internal_Name1' and 'Action_Internal_Name2' actions
77
+
78
+ ```sh
79
+ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --name 08586653536760200319026785874CU62 --withActions "Action_Internal_Name1,Action_Internal_Name2"
61
80
  ```
62
81
 
63
82
  ## Response
@@ -157,9 +176,9 @@ m365 flow run get --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5
157
176
  </TabItem>
158
177
  </Tabs>
159
178
 
160
- ### `includeTriggerInformation` response
179
+ ### `withTrigger` response
161
180
 
162
- When using the option `includeTriggerInformation`, the response for the json-output will differ.
181
+ When using the option `withTrigger`, the response for the json-output will differ.
163
182
 
164
183
  <Tabs>
165
184
  <TabItem value="JSON">
@@ -233,3 +252,147 @@ When using the option `includeTriggerInformation`, the response for the json-out
233
252
  </TabItem>
234
253
  </Tabs>
235
254
 
255
+ ### `withActions` response
256
+
257
+ When using the option `withActions`, the response for the json-output will differ.
258
+
259
+ <Tabs>
260
+ <TabItem value="JSON">
261
+
262
+ ```json
263
+ {
264
+ "name": "08585236861638480597867166179CU104",
265
+ "id": "/providers/Microsoft.ProcessSimple/environments/Default-e1dd4023-a656-480a-8a0e-c1b1eec51e1d/flows/24335774-daf6-4183-acb7-f5155c2cd2fe/runs/08585236861638480597867166179CU104",
266
+ "type": "Microsoft.ProcessSimple/environments/flows/runs",
267
+ "properties": {
268
+ "actions":{
269
+ "Compose": {
270
+ "input": "Test",
271
+ "inputsLink": {
272
+ "uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionInputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=wYD6bMHjdoOawYAMTHqpmyILowLKRCkFEfsNxi1NFzw",
273
+ "contentVersion": "test==",
274
+ "contentSize": 6,
275
+ "contentHash": {
276
+ "algorithm": "md5",
277
+ "value": "test=="
278
+ }
279
+ },
280
+ "output": "Test",
281
+ "outputsLink": {
282
+ "uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionOutputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=KoI4_RAEVNFUgymktOFxvfb5mCoIKR2WCYGwexjD7kY",
283
+ "contentVersion": "test==",
284
+ "contentSize": 6,
285
+ "contentHash": {
286
+ "algorithm": "md5",
287
+ "value": "test=="
288
+ }
289
+ },
290
+ "startTime": "2023-11-17T21:06:14.466889Z",
291
+ "endTime": "2023-11-17T21:06:14.4676104Z",
292
+ "correlation": {
293
+ "actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
294
+ "clientTrackingId": "08585013686846794051719443325CU251",
295
+ "clientKeywords": [
296
+ "resubmitFlow"
297
+ ]
298
+ },
299
+ "status": "Succeeded",
300
+ "code": "OK"
301
+ }
302
+ },
303
+ "startTime": "2023-03-04T09:05:21.8066368Z",
304
+ "endTime": "2023-03-04T09:05:22.5880202Z",
305
+ "status": "Succeeded",
306
+ "correlation": {
307
+ "clientTrackingId": "08585236861638480598867166179CU131"
308
+ },
309
+ "trigger": {
310
+ "name": "When_an_email_is_flagged_(V4)",
311
+ "inputsLink": {
312
+ "uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerInputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=",
313
+ "contentVersion": "2v/VLXFrKV6JvwSdcN7aHg==",
314
+ "contentSize": 343,
315
+ "contentHash": {
316
+ "algorithm": "md5",
317
+ "value": "2v/VLXFrKV6JvwSdcN7aHg=="
318
+ }
319
+ },
320
+ "outputsLink": {
321
+ "uri": "https://prod-130.westeurope.logic.azure.com:443/workflows/3ebadb794f6641e0b7f4fda131cdfb0b/runs/08585236861638480597867166179CU104/contents/TriggerOutputs?api-version=2016-06-01&se=2023-03-04T14%3A00%3A00.0000000Z&sp=%2Fruns%2F08585236861638480597867166179CU104%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=",
322
+ "contentVersion": "AHZEeWNlQ0bLe48yDmpzrQ==",
323
+ "contentSize": 3478,
324
+ "contentHash": {
325
+ "algorithm": "md5",
326
+ "value": "AHZEeWNlQ0bLe48yDmpzrQ=="
327
+ }
328
+ },
329
+ "startTime": "2023-03-04T09:05:21.6192576Z",
330
+ "endTime": "2023-03-04T09:05:21.7442626Z",
331
+ "scheduledTime": "2023-03-04T09:05:21.573561Z",
332
+ "originHistoryName": "08585236861638480598867166179CU131",
333
+ "correlation": {
334
+ "clientTrackingId": "08585236861638480598867166179CU131"
335
+ },
336
+ "code": "OK",
337
+ "status": "Succeeded"
338
+ }
339
+ },
340
+ "startTime": "2023-03-04T09:05:21.8066368Z",
341
+ "endTime": "2023-03-04T09:05:22.5880202Z",
342
+ "status": "Succeeded",
343
+ "triggerName": "When_an_email_is_flagged_(V4)",
344
+ "triggerInformation": {
345
+ "from": "john@contoso.com",
346
+ "toRecipients": "doe@contoso.com",
347
+ "subject": "Dummy email",
348
+ "body": "<html><head>\r\\\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body><p>This is dummy content</p></body></html>",
349
+ "importance": "normal",
350
+ "bodyPreview": "This is dummy content",
351
+ "hasAttachments": false,
352
+ "id": "AAMkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgBGAAAAAAC6jQfUzacTSIHqMw2yacnUBwBiOC8xvYmdT6G2E_hLMK5kAAAAAAEMAABiOC8xvYmdT6G2E_hLMK5kAALUqy81AAA=",
353
+ "internetMessageId": "<DB7PR03MB5018879914324FC65695809FE1AD9@DB7PR03MB5018.eurprd03.prod.outlook.com>",
354
+ "conversationId": "AAQkADgzN2Q1NThiLTI0NjYtNGIxYS05MDdjLTg1OWQxNzgwZGM2ZgAQAMqP9zsK8a1CnIYEgHclLTk=",
355
+ "receivedDateTime": "2023-03-01T15:06:57+00:00",
356
+ "isRead": false,
357
+ "attachments": [],
358
+ "isHtml": true
359
+ },
360
+ "actions": {
361
+ "Compose": {
362
+ "input": "Test",
363
+ "inputsLink": {
364
+ "uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionInputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionInputs%2Fread&sv=1.0&sig=wYD6bMHjdoOawYAMTHqpmyILowLKRCkFEfsNxi1NFzw",
365
+ "contentVersion": "test==",
366
+ "contentSize": 6,
367
+ "contentHash": {
368
+ "algorithm": "md5",
369
+ "value": "test=="
370
+ }
371
+ },
372
+ "output": "Test",
373
+ "outputsLink": {
374
+ "uri": "https://prod-255.westeurope.logic.azure.com:443/workflows/88b5146587d144ea85efb15683c4e58f/runs/08586652586741142222645090602CU35/actions/Compose/contents/ActionOutputs?api-version=2016-06-01&se=2023-12-14T19%3A00%3A00.0000000Z&sp=%2Fruns%2F08586652586741142222645090602CU35%2Factions%2FCompose%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=KoI4_RAEVNFUgymktOFxvfb5mCoIKR2WCYGwexjD7kY",
375
+ "contentVersion": "test==",
376
+ "contentSize": 6,
377
+ "contentHash": {
378
+ "algorithm": "md5",
379
+ "value": "test=="
380
+ }
381
+ },
382
+ "startTime": "2023-11-17T21:06:14.466889Z",
383
+ "endTime": "2023-11-17T21:06:14.4676104Z",
384
+ "correlation": {
385
+ "actionTrackingId": "dabed750-0ec4-4c34-98f5-cc3695e0811e",
386
+ "clientTrackingId": "08585013686846794051719443325CU251",
387
+ "clientKeywords": [
388
+ "resubmitFlow"
389
+ ]
390
+ },
391
+ "status": "Succeeded",
392
+ "code": "OK"
393
+ }
394
+ }
395
+ }
396
+ ```
397
+ </TabItem>
398
+ </Tabs>
@@ -33,18 +33,24 @@ m365 spo group member add [options]
33
33
  `--userIds [userIds]`
34
34
  : The user Id of the user to add as a member. (Id of the site user, for example: 14) If multiple users need to be added, the Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
35
35
 
36
+ `--entraGroupIds [entraGroupIds]`
37
+ : The object Id of the Entra group to add as a member. If multiple groups need to be added, the Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds`, `entraGroupIds`, `aadGroupNames`, or `entraGroupNames`.
38
+
36
39
  `--aadGroupIds [aadGroupIds]`
37
- : The object Id of the Azure AD group to add as a member. If multiple groups need to be added, the Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
40
+ : (deprecated. Use `entraGroupIds` instead) The object Id of the Azure AD group to add as a member. If multiple groups need to be added, the Ids have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds`, `entraGroupIds`, `aadGroupNames`, or `entraGroupNames`.
41
+
42
+ `--entraGroupNames [entraGroupNames]`
43
+ : The name of the Entra group to add as a member. If multiple groups need to be added, they have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds`, `entraGroupIds`, `aadGroupNames`, or `entraGroupNames`.
38
44
 
39
45
  `--aadGroupNames [aadGroupNames]`
40
- : The name of the Azure AD group to add as a member. If multiple groups need to be added, they have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames`.
46
+ : (deprecated. Use `entraGroupNames` instead) The name of the Azure AD group to add as a member. If multiple groups need to be added, they have to be comma-separated. Specify either `userIds`, `userNames`, `emails`, `aadGroupIds`, `entraGroupIds`, `aadGroupNames`, or `entraGroupNames`.
41
47
  ```
42
48
 
43
49
  <Global />
44
50
 
45
51
  ## Remarks
46
52
 
47
- For the `userIds`, `userNames`, `emails`, `aadGroupIds` or `aadGroupNames` options you can specify multiple values by separating them with a comma. If one of the specified entries is not valid, the command will fail with an error message showing the list of invalid values.
53
+ For the `userIds`, `userNames`, `emails`, `aadGroupIds`, `entraGroupIds`, `aadGroupNames`, or `entraGroupNames` options you can specify multiple values by separating them with a comma. If one of the specified entries is not valid, the command will fail with an error message showing the list of invalid values.
48
54
 
49
55
  ## Examples
50
56
 
@@ -84,11 +90,17 @@ Add multiple users with the userIds parameter to a SharePoint group with the gro
84
90
  m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --userIds "5,12"
85
91
  ```
86
92
 
87
- Add multiple users with the aadGroupNames parameter to a SharePoint group with the groupId parameter
93
+ Add multiple users with the entraGroupIds parameter to a SharePoint group with the groupId parameter.
94
+
95
+ ```sh
96
+ m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --entraGroupIds "f2fb2f10-cfd2-4054-8ffd-64533657a5ab,3e86049e-89e6-4c27-bccb-d7549f0bbd06"
97
+ ```
98
+
99
+ Add multiple users with the entraGroupNames parameter to a SharePoint group with the groupId parameter.
88
100
 
89
- ```sh
90
- m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadGroupNames "Azure group one, Azure group two"
91
- ```
101
+ ```sh
102
+ m365 spo group member add --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --entraGroupNames "Azure group one, Azure group two"
103
+ ```
92
104
 
93
105
  ## Response
94
106
 
@@ -31,11 +31,17 @@ m365 spo group member remove [options]
31
31
  `--userId [userId]`
32
32
  : The user Id (Id of the site user, eg. 14) of the user to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
33
33
 
34
+ `--entraGroupId [entraGroupId]`
35
+ : The object Id of the Entra group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId`, `entraGroupId`, `aadGroupName`, or `entraGroupName`.
36
+
34
37
  `--aadGroupId [aadGroupId]`
35
- : The object Id of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
38
+ : (deprecated. Use `entraGroupId` instead) The object Id of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId`, `entraGroupId`, `aadGroupName`, or `entraGroupName`.
39
+
40
+ `--entraGroupName [entraGroupName]`
41
+ : The name of the Entra group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId`, `entraGroupId`, `aadGroupName`, or `entraGroupName`.
36
42
 
37
43
  `--aadGroupName [aadGroupName]`
38
- : The name of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId` or `aadGroupName`.
44
+ : (deprecated. Use `entraGroupName` instead) The name of the Azure AD group to remove as a member. Specify either `userName`, `email`, `userId`, `aadGroupId`, `entraGroupId`, `aadGroupName`, or `entraGroupName`.
39
45
  ```
40
46
 
41
47
  <Global />
@@ -60,16 +66,16 @@ Remove a user from a SharePoint group by email.
60
66
  m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --userId 14
61
67
  ```
62
68
 
63
- Remove an Azure AD group from a SharePoint group based on the Azure AD group name on a given web.
69
+ Remove an Entra group from a SharePoint group based on the Entra group name on a given web.
64
70
 
65
71
  ```sh
66
- m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --aadGroupName "Azure AD Security Group"
72
+ m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupId 5 --entraGroupName "Azure AD Security Group"
67
73
  ```
68
74
 
69
- Remove an Azure AD group from a SharePoint group based on the Azure AD group ID on a given web.
75
+ Remove an Entra group from a SharePoint group based on the Entra group ID on a given web.
70
76
 
71
77
  ```sh
72
- m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --aadGroupId "5786b8e8-c495-4734-b345-756733960730"
78
+ m365 spo group member remove --webUrl https://contoso.sharepoint.com/sites/SiteA --groupName "Site A Visitors" --entraGroupId "5786b8e8-c495-4734-b345-756733960730"
73
79
  ```
74
80
 
75
81
  ## Response