@pnp/cli-microsoft365 6.4.0-beta.aacf728 → 6.4.0-beta.e3b0f5c

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.
@@ -22,6 +22,7 @@ const spo_1 = require("../../../../utils/spo");
22
22
  const validation_1 = require("../../../../utils/validation");
23
23
  const SpoCommand_1 = require("../../../base/SpoCommand");
24
24
  const commands_1 = require("../../commands");
25
+ const os = require("os");
25
26
  class SpoTermGetCommand extends SpoCommand_1.default {
26
27
  get name() {
27
28
  return commands_1.default.TERM_GET;
@@ -50,32 +51,34 @@ class SpoTermGetCommand extends SpoCommand_1.default {
50
51
  data = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="14" ObjectPathId="13" /><ObjectIdentityQuery Id="15" ObjectPathId="13" /><Query Id="16" ObjectPathId="13"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><StaticMethod Id="6" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="7" ParentId="6" Name="GetDefaultSiteCollectionTermStore" /><Method Id="13" ParentId="7" Name="GetTerm"><Parameters><Parameter Type="Guid">{${args.options.id}}</Parameter></Parameters></Method></ObjectPaths></Request>`;
51
52
  }
52
53
  else {
53
- const termGroupQuery = args.options.termGroupId ? `<Method Id="98" ParentId="96" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termGroupId}}</Parameter></Parameters></Method>` : `<Method Id="98" ParentId="96" Name="GetByName"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.termGroupName)}</Parameter></Parameters></Method>`;
54
- const termSetQuery = args.options.termSetId ? `<Method Id="103" ParentId="101" Name="GetById"><Parameters><Parameter Type="Guid">{${args.options.termSetId}}</Parameter></Parameters></Method>` : `<Method Id="103" ParentId="101" Name="GetByName"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.termSetName)}</Parameter></Parameters></Method>`;
55
- data = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="91" ObjectPathId="90" /><ObjectIdentityQuery Id="92" ObjectPathId="90" /><ObjectPath Id="94" ObjectPathId="93" /><ObjectIdentityQuery Id="95" ObjectPathId="93" /><ObjectPath Id="97" ObjectPathId="96" /><ObjectPath Id="99" ObjectPathId="98" /><ObjectIdentityQuery Id="100" ObjectPathId="98" /><ObjectPath Id="102" ObjectPathId="101" /><ObjectPath Id="104" ObjectPathId="103" /><ObjectIdentityQuery Id="105" ObjectPathId="103" /><ObjectPath Id="107" ObjectPathId="106" /><ObjectPath Id="109" ObjectPathId="108" /><ObjectIdentityQuery Id="110" ObjectPathId="108" /><Query Id="111" ObjectPathId="108"><Query SelectAllProperties="true"><Properties /></Query></Query></Actions><ObjectPaths><StaticMethod Id="90" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="93" ParentId="90" Name="GetDefaultSiteCollectionTermStore" /><Property Id="96" ParentId="93" Name="Groups" />${termGroupQuery}<Property Id="101" ParentId="98" Name="TermSets" />${termSetQuery}<Property Id="106" ParentId="103" Name="Terms" /><Method Id="108" ParentId="106" Name="GetByName"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.name)}</Parameter></Parameters></Method></ObjectPaths></Request>`;
54
+ data = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config_1.default.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><ObjectPath Id="2" ObjectPathId="1" /><ObjectIdentityQuery Id="3" ObjectPathId="1" /><ObjectPath Id="5" ObjectPathId="4" /><ObjectIdentityQuery Id="6" ObjectPathId="4" /><ObjectPath Id="8" ObjectPathId="7" /><ObjectPath Id="10" ObjectPathId="9" /><ObjectIdentityQuery Id="11" ObjectPathId="9" /><ObjectPath Id="13" ObjectPathId="12" /><ObjectPath Id="15" ObjectPathId="14" /><ObjectIdentityQuery Id="16" ObjectPathId="14" /><ObjectPath Id="18" ObjectPathId="17" /><SetProperty Id="19" ObjectPathId="17" Name="TrimUnavailable"><Parameter Type="Boolean">true</Parameter></SetProperty><SetProperty Id="20" ObjectPathId="17" Name="TermLabel"><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.name)}</Parameter></SetProperty><ObjectPath Id="22" ObjectPathId="21" /><Query Id="23" ObjectPathId="21"><Query SelectAllProperties="true"><Properties /></Query><ChildItemQuery SelectAllProperties="true"><Properties /></ChildItemQuery></Query></Actions><ObjectPaths><StaticMethod Id="1" Name="GetTaxonomySession" TypeId="{981cbc68-9edc-4f8d-872f-71146fcbb84f}" /><Method Id="4" ParentId="1" Name="GetDefaultSiteCollectionTermStore" /><Property Id="7" ParentId="4" Name="Groups" /><Method Id="9" ParentId="7" Name="${args.options.termGroupName === undefined ? "GetById" : "GetByName"}"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.termGroupName) || args.options.termGroupId}</Parameter></Parameters></Method><Property Id="12" ParentId="9" Name="TermSets" /><Method Id="14" ParentId="12" Name="${args.options.termSetName === undefined ? "GetById" : "GetByName"}"><Parameters><Parameter Type="String">${formatting_1.formatting.escapeXml(args.options.termSetName) || args.options.termSetId}</Parameter></Parameters></Method><Constructor Id="17" TypeId="{61a1d689-2744-4ea3-a88b-c95bee9803aa}" /><Method Id="21" ParentId="14" Name="GetTerms"><Parameters><Parameter ObjectPathId="17" /></Parameters></Method></ObjectPaths></Request>`;
56
55
  }
57
- const requestOptions = {
58
- url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
59
- headers: {
60
- 'X-RequestDigest': res.FormDigestValue
61
- },
62
- data: data
63
- };
64
- const processQuery = yield request_1.default.post(requestOptions);
65
- const json = JSON.parse(processQuery);
66
- const response = json[0];
67
- if (response.ErrorInfo) {
68
- throw response.ErrorInfo.ErrorMessage;
56
+ let term;
57
+ const csomResponse = yield this.executeCsomCall(data, spoAdminUrl, res);
58
+ if (csomResponse === null) {
59
+ throw `Term with id '${args.options.id}' could not be found.`;
69
60
  }
70
- const term = json[json.length - 1];
71
- if (!term) {
72
- return;
61
+ else if (csomResponse._Child_Items_ !== undefined) {
62
+ const terms = csomResponse;
63
+ if (terms._Child_Items_.length === 0) {
64
+ throw `Term with name '${args.options.name}' could not be found.`;
65
+ }
66
+ if (terms._Child_Items_.length > 1) {
67
+ const disambiguationText = terms._Child_Items_.map(c => {
68
+ return `- ${this.getTermId(c.Id)} - ${c.PathOfTerm}`;
69
+ }).join(os.EOL);
70
+ throw new Error(`Multiple terms with the specific term name found. Please disambiguate:${os.EOL}${disambiguationText}`);
71
+ }
72
+ term = terms._Child_Items_[0];
73
+ }
74
+ else {
75
+ term = csomResponse;
73
76
  }
74
77
  delete term._ObjectIdentity_;
75
78
  delete term._ObjectType_;
76
- term.CreatedDate = new Date(Number(term.CreatedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
77
- term.Id = term.Id.replace('/Guid(', '').replace(')/', '');
78
- term.LastModifiedDate = new Date(Number(term.LastModifiedDate.replace('/Date(', '').replace(')/', ''))).toISOString();
79
+ term.CreatedDate = this.parseTermDateToIsoString(term.CreatedDate);
80
+ term.Id = this.getTermId(term.Id);
81
+ term.LastModifiedDate = this.parseTermDateToIsoString(term.LastModifiedDate);
79
82
  logger.log(term);
80
83
  }
81
84
  catch (err) {
@@ -83,6 +86,31 @@ class SpoTermGetCommand extends SpoCommand_1.default {
83
86
  }
84
87
  });
85
88
  }
89
+ executeCsomCall(data, spoAdminUrl, res) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const requestOptions = {
92
+ url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
93
+ headers: {
94
+ 'X-RequestDigest': res.FormDigestValue
95
+ },
96
+ data: data
97
+ };
98
+ const processQuery = yield request_1.default.post(requestOptions);
99
+ const json = JSON.parse(processQuery);
100
+ const response = json[0];
101
+ if (response.ErrorInfo) {
102
+ throw response.ErrorInfo.ErrorMessage;
103
+ }
104
+ const responseObject = json[json.length - 1];
105
+ return responseObject;
106
+ });
107
+ }
108
+ getTermId(termId) {
109
+ return termId.replace('/Guid(', '').replace(')/', '');
110
+ }
111
+ parseTermDateToIsoString(dateAsString) {
112
+ return new Date(Number(dateAsString.replace('/Date(', '').replace(')/', ''))).toISOString();
113
+ }
86
114
  }
87
115
  _SpoTermGetCommand_instances = new WeakSet(), _SpoTermGetCommand_initTelemetry = function _SpoTermGetCommand_initTelemetry() {
88
116
  this.telemetry.push((args) => {
@@ -111,39 +139,31 @@ _SpoTermGetCommand_instances = new WeakSet(), _SpoTermGetCommand_initTelemetry =
111
139
  });
112
140
  }, _SpoTermGetCommand_initValidators = function _SpoTermGetCommand_initValidators() {
113
141
  this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
114
- if (args.options.id) {
115
- if (!validation_1.validation.isValidGuid(args.options.id)) {
116
- return `${args.options.id} is not a valid GUID`;
117
- }
142
+ if (args.options.id && !validation_1.validation.isValidGuid(args.options.id)) {
143
+ return `${args.options.id} is not a valid GUID`;
118
144
  }
119
- if (args.options.name) {
120
- if (!args.options.termGroupId && !args.options.termGroupName) {
121
- return 'Specify termGroupId or termGroupName';
122
- }
123
- if (!args.options.termSetId && !args.options.termSetName) {
124
- return 'Specify termSetId or termSetName';
125
- }
145
+ if (args.options.termGroupId && !validation_1.validation.isValidGuid(args.options.termGroupId)) {
146
+ return `${args.options.termGroupId} is not a valid GUID`;
126
147
  }
127
- if (args.options.termGroupId && args.options.termGroupName) {
128
- return 'Specify termGroupId or termGroupName but not both';
129
- }
130
- if (args.options.termGroupId) {
131
- if (!validation_1.validation.isValidGuid(args.options.termGroupId)) {
132
- return `${args.options.termGroupId} is not a valid GUID`;
133
- }
134
- }
135
- if (args.options.termSetId && args.options.termSetName) {
136
- return 'Specify termSetId or termSetName but not both';
137
- }
138
- if (args.options.termSetId) {
139
- if (!validation_1.validation.isValidGuid(args.options.termSetId)) {
140
- return `${args.options.termSetId} is not a valid GUID`;
141
- }
148
+ if (args.options.termSetId && !validation_1.validation.isValidGuid(args.options.termSetId)) {
149
+ return `${args.options.termSetId} is not a valid GUID`;
142
150
  }
143
151
  return true;
144
152
  }));
145
153
  }, _SpoTermGetCommand_initOptionSets = function _SpoTermGetCommand_initOptionSets() {
146
- this.optionSets.push({ options: ['id', 'name'] });
154
+ this.optionSets.push({
155
+ options: ['id', 'name']
156
+ }, {
157
+ options: ['termGroupId', 'termGroupName'],
158
+ runsWhen: (args) => {
159
+ return args.options.name !== undefined;
160
+ }
161
+ }, {
162
+ options: ['termSetId', 'termSetName'],
163
+ runsWhen: (args) => {
164
+ return args.options.name !== undefined;
165
+ }
166
+ });
147
167
  };
148
168
  module.exports = new SpoTermGetCommand();
149
169
  //# sourceMappingURL=term-get.js.map
@@ -53,6 +53,24 @@ exports.aadGroup = {
53
53
  }
54
54
  return groups[0];
55
55
  });
56
+ },
57
+ /**
58
+ * Get id of a group by its display name.
59
+ * @param displayName Group display name.
60
+ * @throws Error when group was not found.
61
+ * @throws Error when multiple groups with the same name were found.
62
+ */
63
+ getGroupIdByDisplayName(displayName) {
64
+ return __awaiter(this, void 0, void 0, function* () {
65
+ const groups = yield odata_1.odata.getAllItems(`${graphResource}/v1.0/groups?$filter=displayName eq '${formatting_1.formatting.encodeQueryParameter(displayName)}'&$select=id`);
66
+ if (!groups.length) {
67
+ throw Error(`The specified group '${displayName}' does not exist.`);
68
+ }
69
+ if (groups.length > 1) {
70
+ throw Error(`Multiple groups with name '${displayName}' found: ${groups.map(x => x.id).join(',')}.`);
71
+ }
72
+ return groups[0].id;
73
+ });
56
74
  }
57
75
  };
58
76
  //# sourceMappingURL=aadGroup.js.map
@@ -20,10 +20,10 @@ m365 aad approleassignment add [options]
20
20
  : Application name of the App Registration to which the configured scopes (app roles) should be applied
21
21
 
22
22
  `-r, --resource <resource>`
23
- : Service principal name, appId or objectId that has the scopes (roles) ex. `SharePoint`.
23
+ : Service principal name, appId or objectId that has the scopes (roles) e.g. `SharePoint`.
24
24
 
25
25
  `-s, --scope <scope>`
26
- : Permissions known also as scopes and roles to grant the application with. If multiple permissions have to be granted, they have to be comma separated ex. `Sites.Read.All,Sites.ReadWrite.all`
26
+ : Permissions known also as scopes and roles to grant the application with. If multiple permissions have to be granted, they have to be comma-separated e.g. `Sites.Read.All,Sites.ReadWrite.all`
27
27
 
28
28
  --8<-- "docs/cmd/_global.md"
29
29
 
@@ -33,7 +33,7 @@ This command requires tenant administrator permissions.
33
33
 
34
34
  Specify either the `appId`, `appObjectId` or `appDisplayName` but not multiple. If you specify more than one option value, the command will fail with an error.
35
35
 
36
- Autocomplete values for the `resource` option do not mean allowed values. The autocomplete will just suggest some known names, but that doesn't restrict you to use name of your own custom application or other application within your tenant.
36
+ Autocomplete values for the `resource` option do not mean allowed values. The autocomplete will just suggest some known names, but that doesn't restrict you to use the name of your own custom application or other application within your tenant.
37
37
 
38
38
  This command can also be used to assign permissions to system or user-assigned managed identity.
39
39
 
@@ -45,13 +45,13 @@ Adds SharePoint _Sites.Read.All_ application permissions to Azure AD application
45
45
  m365 aad approleassignment add --appId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "SharePoint" --scope "Sites.Read.All"
46
46
  ```
47
47
 
48
- Adds multiple Microsoft Graph application permissions to an Azure AD application with name _MyAppName_
48
+ Adds multiple Microsoft Graph application permissions to an Azure AD application with the name _MyAppName__
49
49
 
50
50
  ```sh
51
51
  m365 aad approleassignment add --appDisplayName "MyAppName" --resource "Microsoft Graph" --scope "Mail.Read,Mail.Send"
52
52
  ```
53
53
 
54
- Adds Microsoft Graph _Mail.Read_ application permissions to a system managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
54
+ Adds Microsoft Graph _Mail.Read_ application permissions to a system-managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
55
55
 
56
56
  ```sh
57
57
  m365 aad approleassignment add --appObjectId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "Microsoft Graph" --scope "Mail.Read"
@@ -20,10 +20,10 @@ m365 aad approleassignment remove [options]
20
20
  : Application name of the App Registration for which the configured scopes (app roles) should be deleted
21
21
 
22
22
  `-r, --resource <resource>`
23
- : Service principal name, appId or objectId that has the scopes (roles) ex. `SharePoint`
23
+ : Service principal name, appId or objectId that has the scopes (roles) e.g. `SharePoint`
24
24
 
25
25
  `-s, --scope <scope>`
26
- : Permissions known also as scopes and roles to be deleted from the application. If multiple permissions have to be deleted, they have to be comma separated ex. `Sites.Read.All`,`Sites.ReadWrite.All`
26
+ : Permissions known also as scopes and roles to be deleted from the application. If multiple permissions have to be deleted, they have to be comma-separated e.g. `Sites.Read.All`,`Sites.ReadWrite.All`
27
27
 
28
28
  `--confirm`
29
29
  : Don't prompt for confirming removing the all role assignment
@@ -54,7 +54,7 @@ Deletes multiple Microsoft Graph application permissions from an Azure AD applic
54
54
  m365 aad approleassignment remove --appDisplayName "MyAppName" --resource "Microsoft Graph" --scope "Mail.Read,Mail.Send"
55
55
  ```
56
56
 
57
- Deletes Microsoft Graph _Mail.Read_ application permissions from a system managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
57
+ Deletes Microsoft Graph _Mail.Read_ application permissions from a system-managed identity app with objectId _57907bf8-73fa-43a6-89a5-1f603e29e451_
58
58
 
59
59
  ```sh
60
60
  m365 aad approleassignment remove --appObjectId "57907bf8-73fa-43a6-89a5-1f603e29e451" --resource "Microsoft Graph" --scope "Mail.Read"
@@ -0,0 +1,61 @@
1
+ # flow owner add
2
+
3
+ Assigns permissions to a Power Automate flow
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 flow owner add [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-e, --environmentName <environmentName>`
14
+ : The name of the environment.
15
+
16
+ `-f, --flowName <flowName>`
17
+ : The name of the Power Automate flow.
18
+
19
+ `--userId [userId]`
20
+ : The ID of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
21
+
22
+ `--userName [userName]`
23
+ : User principal name of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
24
+
25
+ `--groupId [groupId]`
26
+ : The ID of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
27
+
28
+ `--groupName [groupName]`
29
+ : The name of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
30
+
31
+ `--roleName <roleName>`
32
+ : Access level for the user on the flow. Valid options are `CanView` or `CanEdit`.
33
+
34
+ `--asAdmin`
35
+ : Run the command as admin.
36
+
37
+ --8<-- "docs/cmd/_global.md"
38
+
39
+ ## Examples
40
+
41
+ Assign owner permissions to a specific Power Automate flow for a user with ID
42
+
43
+ ```sh
44
+ m365 flow owner add --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
45
+ ```
46
+
47
+ Assign owner permissions to a specific Power Automate flow for a user with UPN
48
+
49
+ ```sh
50
+ m365 flow owner add --userName "john.doe@contoso.com" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
51
+ ```
52
+
53
+ Assign owner permissions to a specific Power Automate flow for a group
54
+
55
+ ```sh
56
+ m365 flow owner add --groupId 8d4d9f32-1ab0-4f81-9054-efbb1759e8e6 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --roleName CanEdit
57
+ ```
58
+
59
+ ## Response
60
+
61
+ The command won't return a response on success.
@@ -0,0 +1,67 @@
1
+ # flow owner remove
2
+
3
+ Removes owner permissions to a Power Automate flow
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 flow owner remove [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `-e, --environmentName <environmentName>`
14
+ : The name of the environment.
15
+
16
+ `-f, --flowName <flowName>`
17
+ : The name of the Power Automate flow.
18
+
19
+ `--userId [userId]`
20
+ : The ID of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
21
+
22
+ `--userName [userName]`
23
+ : User principal name of the user. Specify either `userId`, `userName`, `groupId` or `groupName`.
24
+
25
+ `--groupId [groupId]`
26
+ : The ID of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
27
+
28
+ `--groupName [groupName]`
29
+ : The name of the group. Specify either `userId`, `userName`, `groupId` or `groupName`.
30
+
31
+ `--asAdmin`
32
+ : Run the command as admin.
33
+
34
+ `--confirm`
35
+ : Don't prompt for confirmation.
36
+
37
+ --8<-- "docs/cmd/_global.md"
38
+
39
+ ## Examples
40
+
41
+ Remove owner permissions from a specific Power Automate flow for a user by ID without prompting for confirmation
42
+
43
+ ```sh
44
+ m365 flow owner remove --userId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --confirm
45
+ ```
46
+
47
+ Remove owner permissions from a specific Power Automate flow for a user by UPN as admin
48
+
49
+ ```sh
50
+ m365 flow owner remove --userName john.doe@contoso.com --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --asAdmin
51
+ ```
52
+
53
+ Remove owner permissions from a specific Power Automate flow for a group by ID
54
+
55
+ ```sh
56
+ m365 flow owner remove --groupId 5c241023-2ba5-4ea8-a516-a2481a3e6c51 --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72
57
+ ```
58
+
59
+ Remove owner permissions from a specific Power Automate flow for a group by name as admin
60
+
61
+ ```sh
62
+ m365 flow owner remove --groupName "Test group" --environmentName Default-c5a5d746-3520-453f-8a69-780f8e44917e --flowName 72f2be4a-78c1-4220-a048-dbf557296a72 --asAdmin
63
+ ```
64
+
65
+ ## Response
66
+
67
+ The command won't return a response on success.
@@ -25,6 +25,9 @@ m365 flow run list [options]
25
25
  `--triggerEndTime [triggerEndTime]`
26
26
  : Time indicating the exclusive end of a time range of flow runs to return. This should be defined as a valid ISO 8601 string (2021-12-16T18:28:48.6964197Z).
27
27
 
28
+ `--asAdmin`
29
+ : Run the command as admin. Use this flag when targeting flows you don't own.
30
+
28
31
  --8<-- "docs/cmd/_global.md"
29
32
 
30
33
  ## Remarks
@@ -56,6 +59,12 @@ List runs of the specified Microsoft Flow between a specific time range
56
59
  m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --triggerStartTime 2023-01-21T18:19:00Z --triggerEndTime 2023-01-22T00:00:00Z
57
60
  ```
58
61
 
62
+ List runs of the specified Microsoft Flow owned by another user
63
+
64
+ ```sh
65
+ m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --flowName 5923cb07-ce1a-4a5c-ab81-257ce820109a --asAdmin
66
+ ```
67
+
59
68
  ## Response
60
69
 
61
70
  ### Standard response
@@ -123,3 +132,22 @@ m365 flow run list --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c
123
132
  name,startTime,status
124
133
  08585329112602833828909892130CU17,2022-11-17T14:33:45.2763872Z,Running
125
134
  ```
135
+
136
+ === "Markdown"
137
+
138
+ ```md
139
+ # flow run list --environmentName "Default-de348bc7-1aeb-4406-8cb3-97db021cadb4" --flowName "08585329112602833828909892130CU17"
140
+
141
+ Date: 1/3/2023
142
+
143
+ ## 08585329112602833828909892130CU17 (/providers/Microsoft.ProcessSimple/environments/Default-de348bc7-1aeb-4406-8cb3-97db021cadb4/flows/170fb67e-a514-4d84-8727-582022bd13a9/runs/08585329112602833828909892130CU17)
144
+
145
+ Property | Value
146
+ ---------|-------
147
+ name | 08585329112602833828909892130CU17
148
+ id | /providers/Microsoft.ProcessSimple/environments/Default-de348bc7-1aeb-4406-8cb3-97db021cadb4/flows/170fb67e-a514-4d84-8727-582022bd13a9/runs/08585329112602833828909892130CU17
149
+ type | Microsoft.ProcessSimple/environments/flows/runs
150
+ properties | {"startTime":"2022-11-17T14:33:45.2763872Z","status":"Running","correlation":{"clientTrackingId":"08585329112602833829909892130CU00"},"trigger":{"name":"When_a_new_response_is_submitted","inputsLink":{"uri":"https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerInputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerInputs%2Fread&sv=1.0&sig=jmdMRWvY7uGoxTmqd3_a2bJtegXuVyuKTKKUVLiwh38","contentVersion":"6ZrBBE+MJg7IvhMgyJLMmA==","contentSize":349,"contentHash":{"algorithm":"md5","value":"6ZrBBE+MJg7IvhMgyJLMmA=="}},"outputsLink":{"uri":"https://prod-08.centralindia.logic.azure.com:443/workflows/f7bf8f6b5c494e63bfc21b54087a596e/runs/08585329112602833828909892130CU17/contents/TriggerOutputs?api-version=2016-06-01&se=2022-11-17T18%3A00%3A00.0000000Z&sp=%2Fruns%2F08585329112602833828909892130CU17%2Fcontents%2FTriggerOutputs%2Fread&sv=1.0&sig=Y3qqjuWrrcQJrmF7uvm6LVzQy5w-dNOFWJ8Yt8khXvA","contentVersion":"Z/4a8tfYygNAR1xpc44iww==","contentSize":493,"contentHash":{"algorithm":"md5","value":"Z/4a8tfYygNAR1xpc44iww=="}},"startTime":"2022-11-17T14:33:45.1914506Z","endTime":"2022-11-17T14:33:45.1914506Z","originHistoryName":"08585329112602833829909892130CU00","correlation":{"clientTrackingId":"08585329112602833829909892130CU00"},"status":"Succeeded"}}
151
+ startTime | 2022-11-17T14:33:45.2763872Z
152
+ status | Running
153
+ ```
@@ -0,0 +1,87 @@
1
+ # planner roster member get
2
+
3
+ Gets a member of the specified Microsoft Planner Roster
4
+
5
+ ## Usage
6
+
7
+ ```sh
8
+ m365 planner roster member get [options]
9
+ ```
10
+
11
+ ## Options
12
+
13
+ `--rosterId <rosterId>`
14
+ : ID of the Planner Roster.
15
+
16
+ `--userId [userId]`
17
+ : User's Azure AD ID. Specify either `userId` or `userName` but not both.
18
+
19
+ `--userName [userName]`
20
+ : User's UPN (user principal name, e.g. johndoe@example.com). Specify either `userId` or `userName` but not both.
21
+
22
+ --8<-- "docs/cmd/_global.md"
23
+
24
+ ## Remarks
25
+
26
+ !!! attention
27
+ This command is based on an API that is currently in preview and is subject to change once the API reached general availability.
28
+
29
+ ## Examples
30
+
31
+ Gets a specific user by user name as member of the Planner Roster
32
+
33
+ ```sh
34
+ m365 planner roster member get --rosterId tYqYlNd6eECmsNhN_fcq85cAGAnd --userName john.doe@contoso.com
35
+ ```
36
+
37
+ Gets a specific user by ID as member of the Planner Roster
38
+
39
+ ```sh
40
+ m365 planner roster member get --rosterId tYqYlNd6eECmsNhN_fcq85cAGAnd --userId d049a857-f1c3-4fb3-a629-d8cfb3bd7275
41
+ ```
42
+
43
+ ## Response
44
+
45
+ === "JSON"
46
+
47
+ ```json
48
+ {
49
+ "id": "b3a1be03-54a5-43d2-b4fb-6562fe9bec0b",
50
+ "userId": "2056d2f6-3257-4253-8cfc-b73393e414e5",
51
+ "tenantId": "5b7b813c-2339-48cd-8c51-bd4fcb269420",
52
+ "roles": []
53
+ }
54
+ ```
55
+
56
+ === "Text"
57
+
58
+ ```text
59
+ id : b3a1be03-54a5-43d2-b4fb-6562fe9bec0b
60
+ roles : []
61
+ tenantId: 5b7b813c-2339-48cd-8c51-bd4fcb269420
62
+ userId : 2056d2f6-3257-4253-8cfc-b73393e414e5
63
+ ```
64
+
65
+ === "CSV"
66
+
67
+ ```csv
68
+ id,userId,tenantId,roles
69
+ b3a1be03-54a5-43d2-b4fb-6562fe9bec0b,2056d2f6-3257-4253-8cfc-b73393e414e5,5b7b813c-2339-48cd-8c51-bd4fcb269420,[]
70
+ ```
71
+
72
+ === "Markdown"
73
+
74
+ ```md
75
+ # planner roster member get --rosterId "tYqYlNd6eECmsNhN_fcq85cAGAnd" --userId "2056d2f6-3257-4253-8cfc-b73393e414e5"
76
+
77
+ Date: 18/2/2023
78
+
79
+ ## b3a1be03-54a5-43d2-b4fb-6562fe9bec0b
80
+
81
+ Property | Value
82
+ ---------|-------
83
+ id | b3a1be03-54a5-43d2-b4fb-6562fe9bec0b
84
+ userId | 2056d2f6-3257-4253-8cfc-b73393e414e5
85
+ tenantId | 5b7b813c-2339-48cd-8c51-bd4fcb269420
86
+ roles | []
87
+ ```