@pnp/cli-microsoft365 7.1.0-beta.d53f0d9 → 7.2.0-beta.194fd07
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.
- package/.eslintrc.cjs +2 -0
- package/dist/Auth.js +1 -1
- package/dist/Command.js +18 -28
- package/dist/cli/Cli.js +6 -4
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-add.js +61 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-get.js +93 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-list.js +25 -0
- package/dist/m365/aad/commands/administrativeunit/administrativeunit-remove.js +108 -0
- package/dist/m365/aad/commands/group/group-user-list.js +146 -0
- package/dist/m365/aad/commands/m365group/m365group-remove.js +109 -15
- package/dist/m365/aad/commands.js +5 -0
- package/dist/m365/base/AppCommand.js +3 -12
- package/dist/m365/cli/commands/cli-doctor.js +11 -6
- package/dist/m365/commands/setup.js +6 -1
- package/dist/m365/spo/commands/sitedesign/sitedesign-get.js +15 -14
- package/dist/m365/spo/commands/sitedesign/sitedesign-remove.js +22 -22
- package/dist/m365/teams/commands/app/app-update.js +9 -6
- package/dist/m365/todo/commands/task/task-list.js +8 -10
- package/dist/m365/todo/commands/task/task-remove.js +36 -36
- package/dist/m365/todo/commands/task/task-set.js +11 -13
- package/dist/m365/yammer/commands/group/group-user-remove.js +22 -23
- package/dist/utils/aadGroup.js +3 -1
- package/dist/utils/odata.js +20 -19
- package/dist/utils/prompt.js +16 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-add.mdx +115 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-get.mdx +98 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-list.mdx +83 -0
- package/docs/docs/cmd/aad/administrativeunit/administrativeunit-remove.mdx +52 -0
- package/docs/docs/cmd/aad/group/group-user-list.mdx +135 -0
- package/docs/docs/cmd/aad/m365group/m365group-remove.mdx +11 -1
- package/docs/docs/cmd/spo/field/field-get.mdx +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +33 -13
|
@@ -23,29 +23,8 @@ class YammerGroupUserRemoveCommand extends YammerCommand {
|
|
|
23
23
|
__classPrivateFieldGet(this, _YammerGroupUserRemoveCommand_instances, "m", _YammerGroupUserRemoveCommand_initValidators).call(this);
|
|
24
24
|
}
|
|
25
25
|
async commandAction(logger, args) {
|
|
26
|
-
const executeRemoveAction = async () => {
|
|
27
|
-
const endpoint = `${this.resource}/v1/group_memberships.json`;
|
|
28
|
-
const requestOptions = {
|
|
29
|
-
url: endpoint,
|
|
30
|
-
headers: {
|
|
31
|
-
accept: 'application/json;odata.metadata=none',
|
|
32
|
-
'content-type': 'application/json;odata=nometadata'
|
|
33
|
-
},
|
|
34
|
-
responseType: 'json',
|
|
35
|
-
data: {
|
|
36
|
-
group_id: args.options.groupId,
|
|
37
|
-
user_id: args.options.id
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
try {
|
|
41
|
-
await request.delete(requestOptions);
|
|
42
|
-
}
|
|
43
|
-
catch (err) {
|
|
44
|
-
this.handleRejectedODataJsonPromise(err);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
26
|
if (args.options.force) {
|
|
48
|
-
await executeRemoveAction();
|
|
27
|
+
await this.executeRemoveAction(args.options);
|
|
49
28
|
}
|
|
50
29
|
else {
|
|
51
30
|
let messagePrompt = `Are you sure you want to leave group ${args.options.groupId}?`;
|
|
@@ -59,8 +38,28 @@ class YammerGroupUserRemoveCommand extends YammerCommand {
|
|
|
59
38
|
message: messagePrompt
|
|
60
39
|
});
|
|
61
40
|
if (result.continue) {
|
|
62
|
-
await executeRemoveAction();
|
|
41
|
+
await this.executeRemoveAction(args.options);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async executeRemoveAction(options) {
|
|
46
|
+
const requestOptions = {
|
|
47
|
+
url: `${this.resource}/v1/group_memberships.json`,
|
|
48
|
+
headers: {
|
|
49
|
+
accept: 'application/json;odata.metadata=none',
|
|
50
|
+
'content-type': 'application/json;odata=nometadata'
|
|
51
|
+
},
|
|
52
|
+
responseType: 'json',
|
|
53
|
+
data: {
|
|
54
|
+
group_id: options.groupId,
|
|
55
|
+
user_id: options.id
|
|
63
56
|
}
|
|
57
|
+
};
|
|
58
|
+
try {
|
|
59
|
+
await request.delete(requestOptions);
|
|
60
|
+
}
|
|
61
|
+
catch (err) {
|
|
62
|
+
this.handleRejectedODataJsonPromise(err);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
}
|
package/dist/utils/aadGroup.js
CHANGED
|
@@ -54,7 +54,9 @@ export const aadGroup = {
|
|
|
54
54
|
throw Error(`The specified group '${displayName}' does not exist.`);
|
|
55
55
|
}
|
|
56
56
|
if (groups.length > 1) {
|
|
57
|
-
|
|
57
|
+
const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', groups);
|
|
58
|
+
const result = await Cli.handleMultipleResultsFound(`Multiple groups with name '${displayName}' found.`, resultAsKeyValuePair);
|
|
59
|
+
return result.id;
|
|
58
60
|
}
|
|
59
61
|
return groups[0].id;
|
|
60
62
|
},
|
package/dist/utils/odata.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import request from "../request.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
items = items.concat(nextPageItems);
|
|
19
|
-
}
|
|
20
|
-
return items;
|
|
2
|
+
async function getAllItems(param1, metadata) {
|
|
3
|
+
let items = [];
|
|
4
|
+
const requestOptions = typeof param1 !== 'string' ? param1 : {
|
|
5
|
+
url: param1,
|
|
6
|
+
headers: {
|
|
7
|
+
accept: `application/json;odata.metadata=${metadata ?? 'none'}`,
|
|
8
|
+
'odata-version': '4.0'
|
|
9
|
+
},
|
|
10
|
+
responseType: 'json'
|
|
11
|
+
};
|
|
12
|
+
const res = await request.get(requestOptions);
|
|
13
|
+
items = res.value;
|
|
14
|
+
const nextLink = res['@odata.nextLink'] ?? res.nextLink;
|
|
15
|
+
if (nextLink) {
|
|
16
|
+
const nextPageItems = await odata.getAllItems({ ...requestOptions, url: nextLink });
|
|
17
|
+
items = items.concat(nextPageItems);
|
|
21
18
|
}
|
|
19
|
+
return items;
|
|
20
|
+
}
|
|
21
|
+
export const odata = {
|
|
22
|
+
getAllItems
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=odata.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Cli } from '../cli/Cli.js';
|
|
2
|
+
import { settingsNames } from '../settingsNames.js';
|
|
3
|
+
let inquirer;
|
|
4
|
+
export const prompt = {
|
|
5
|
+
/* c8 ignore next 10 */
|
|
6
|
+
async forInput(config, answers) {
|
|
7
|
+
if (!inquirer) {
|
|
8
|
+
inquirer = await import('inquirer');
|
|
9
|
+
}
|
|
10
|
+
const cli = Cli.getInstance();
|
|
11
|
+
const errorOutput = cli.getSettingWithDefaultValue(settingsNames.errorOutput, 'stderr');
|
|
12
|
+
const prompt = inquirer.createPromptModule({ output: errorOutput === 'stderr' ? process.stderr : process.stdout });
|
|
13
|
+
return await prompt(config, answers);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad administrativeunit add
|
|
6
|
+
|
|
7
|
+
Creates a new administrative unit
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad administrativeunit add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --displayname <displayName>`
|
|
19
|
+
: Display name for the administrative unit.
|
|
20
|
+
|
|
21
|
+
`-d, --description [description]`
|
|
22
|
+
: Description for the administrative unit.
|
|
23
|
+
|
|
24
|
+
`--hiddenMembership [hiddenMembership]`
|
|
25
|
+
: Indicates whether the administrative unit and its members are hidden.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
<Global />
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
:::info
|
|
33
|
+
|
|
34
|
+
To use this command you must be either **Global Administrator** or **Privileged Role Administrator**.
|
|
35
|
+
|
|
36
|
+
:::
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
Create an administrative unit with a specific display name
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
m365 aad administrativeunit add --displayName 'Marketing Division'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Create an administrative unit with a specific display name and description
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
m365 aad administrativeunit add --displayName 'Marketing Division' --description 'Marketing department administration'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Create a hidden administrative unit with a specific display name
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
m365 aad administrativeunit add --displayName 'Marketing Division' --hiddenMembership
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Response
|
|
59
|
+
|
|
60
|
+
<Tabs>
|
|
61
|
+
<TabItem value="JSON">
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"id": "00b45a1b-7632-4e94-a3bd-f06aec976d31",
|
|
66
|
+
"deletedDateTime": null,
|
|
67
|
+
"displayName": "Marketing Division",
|
|
68
|
+
"description": "Marketing department administration",
|
|
69
|
+
"membershipRule": null,
|
|
70
|
+
"membershipType": null,
|
|
71
|
+
"membershipRuleProcessingState": null,
|
|
72
|
+
"visibility": null
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
</TabItem>
|
|
77
|
+
<TabItem value="Text">
|
|
78
|
+
|
|
79
|
+
```text
|
|
80
|
+
deletedDateTime : null
|
|
81
|
+
description : Marketing department administration
|
|
82
|
+
displayName : Marketing Division
|
|
83
|
+
id : 00b45a1b-7632-4e94-a3bd-f06aec976d31
|
|
84
|
+
membershipRule : null
|
|
85
|
+
membershipRuleProcessingState: null
|
|
86
|
+
membershipType : null
|
|
87
|
+
visibility : null
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
</TabItem>
|
|
91
|
+
<TabItem value="CSV">
|
|
92
|
+
|
|
93
|
+
```csv
|
|
94
|
+
id,displayName,description,visibility
|
|
95
|
+
00b45a1b-7632-4e94-a3bd-f06aec976d31,Marketing Division,Marketing department administration,HiddenMembership
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</TabItem>
|
|
99
|
+
<TabItem value="Markdown">
|
|
100
|
+
|
|
101
|
+
```md
|
|
102
|
+
Date: 10/23/2023
|
|
103
|
+
|
|
104
|
+
## Marketing Division (00b45a1b-7632-4e94-a3bd-f06aec976d31)
|
|
105
|
+
|
|
106
|
+
Property | Value
|
|
107
|
+
---------|-------
|
|
108
|
+
id | 00b45a1b-7632-4e94-a3bd-f06aec976d31
|
|
109
|
+
displayName | Marketing Division
|
|
110
|
+
description | Marketing department administration
|
|
111
|
+
visibility | HiddenMembership
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
</TabItem>
|
|
115
|
+
</Tabs>
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad administrativeunit get
|
|
6
|
+
|
|
7
|
+
Gets information about a specific administrative unit
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad administrativeunit get [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --id [id]`
|
|
19
|
+
: The id of the administrative unit. Specify either `id` or `displayName` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --displayName [displayName]`
|
|
22
|
+
: The display name of the administrative unit. Specify either `id` or `displayName` but not both.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
Get information about the administrative unit by its id
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 aad administrativeunit get --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Get information about the administrative unit by its display name
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 aad administrativeunit get --displayName 'Marketing Division'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<TabItem value="JSON">
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"id": "0a22c83d-c4ac-43e2-bb5e-87af3015d49f",
|
|
49
|
+
"deletedDateTime": null,
|
|
50
|
+
"displayName": "Marketing Division",
|
|
51
|
+
"description": "Marketing Department Administration",
|
|
52
|
+
"membershipRule": null,
|
|
53
|
+
"membershipType": null,
|
|
54
|
+
"membershipRuleProcessingState": null,
|
|
55
|
+
"visibility": "HiddenMembership"
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
</TabItem>
|
|
60
|
+
<TabItem value="Text">
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
deletedDateTime : null
|
|
64
|
+
description : Marketing Department Administration
|
|
65
|
+
displayName : Marketing Division
|
|
66
|
+
id : 0a22c83d-c4ac-43e2-bb5e-87af3015d49f
|
|
67
|
+
membershipRule : null
|
|
68
|
+
membershipRuleProcessingState: null
|
|
69
|
+
membershipType : null
|
|
70
|
+
visibility : HiddenMembership
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</TabItem>
|
|
74
|
+
<TabItem value="CSV">
|
|
75
|
+
|
|
76
|
+
```csv
|
|
77
|
+
id,displayName,description,visibility
|
|
78
|
+
0a22c83d-c4ac-43e2-bb5e-87af3015d49f,Marketing Division,Marketing Department Administration,HiddenMembership
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
</TabItem>
|
|
82
|
+
<TabItem value="Markdown">
|
|
83
|
+
|
|
84
|
+
```md
|
|
85
|
+
Date: 10/23/2023
|
|
86
|
+
|
|
87
|
+
## Marketing Division (0a22c83d-c4ac-43e2-bb5e-87af3015d49f)
|
|
88
|
+
|
|
89
|
+
Property | Value
|
|
90
|
+
---------|-------
|
|
91
|
+
id | 0a22c83d-c4ac-43e2-bb5e-87af3015d49f
|
|
92
|
+
displayName | Marketing Division
|
|
93
|
+
description | Marketing Department Administration
|
|
94
|
+
visibility | HiddenMembership
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</TabItem>
|
|
98
|
+
</Tabs>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad administrativeunit list
|
|
6
|
+
|
|
7
|
+
Retrieves a list of administrative units
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad administrativeunit list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
<Global />
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
Retrieve a list of administrative units
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
m365 aad administrativeunit list
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Response
|
|
28
|
+
|
|
29
|
+
<Tabs>
|
|
30
|
+
<TabItem value="JSON">
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"id": "0a22c83d-c4ac-43e2-bb5e-87af3015d49f",
|
|
36
|
+
"deletedDateTime": null,
|
|
37
|
+
"displayName": "Marketing Department",
|
|
38
|
+
"description": "Marketing Department Administration",
|
|
39
|
+
"membershipRule": null,
|
|
40
|
+
"membershipType": null,
|
|
41
|
+
"membershipRuleProcessingState": null,
|
|
42
|
+
"visibility": "HiddenMembership"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
</TabItem>
|
|
48
|
+
<TabItem value="Text">
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
displayName: 0a22c83d-c4ac-43e2-bb5e-87af3015d49f
|
|
52
|
+
id : Marketing Department
|
|
53
|
+
visibility : HiddenMembership
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
</TabItem>
|
|
57
|
+
<TabItem value="CSV">
|
|
58
|
+
|
|
59
|
+
```csv
|
|
60
|
+
id,displayName,description,visibility
|
|
61
|
+
0a22c83d-c4ac-43e2-bb5e-87af3015d49f,Marketing Department,Marketing Department Administration,HiddenMembership
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
</TabItem>
|
|
65
|
+
<TabItem value="Markdown">
|
|
66
|
+
|
|
67
|
+
```md
|
|
68
|
+
# aad administrativeunit list
|
|
69
|
+
|
|
70
|
+
Date: 2023-10-16
|
|
71
|
+
|
|
72
|
+
## Marketing Department (0a22c83d-c4ac-43e2-bb5e-87af3015d49f)
|
|
73
|
+
|
|
74
|
+
Property | Value
|
|
75
|
+
---------|-------
|
|
76
|
+
id | 0a22c83d-c4ac-43e2-bb5e-87af3015d49f
|
|
77
|
+
displayName | Marketing Department
|
|
78
|
+
description | Marketing Department Administration
|
|
79
|
+
visibility | HiddenMembership
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
</TabItem>
|
|
83
|
+
</Tabs>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# aad administrativeunit remove
|
|
4
|
+
|
|
5
|
+
Removes an administrative unit
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 aad administrativeunit remove [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The id of the administrative unit. Specify either `id` or `displayName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --displayName [displayName]`
|
|
20
|
+
: The display name of the administrative unit. Specify either `id` or `displayName` but not both.
|
|
21
|
+
|
|
22
|
+
`-f, --force [force]`
|
|
23
|
+
: Don't prompt for confirmation.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
<Global />
|
|
27
|
+
|
|
28
|
+
## Remarks
|
|
29
|
+
|
|
30
|
+
:::info
|
|
31
|
+
|
|
32
|
+
To use this command you must be either **Global Administrator** or **Privileged Role Administrator**.
|
|
33
|
+
|
|
34
|
+
:::
|
|
35
|
+
|
|
36
|
+
## Examples
|
|
37
|
+
|
|
38
|
+
Remove an administrative unit by its id
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
m365 aad administrativeunit remove --id 03c4c9dc-6f0c-4c4f-a4e6-0c9ed80f54c7
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Remove an administrative unit by it displayName
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 aad administrativeunit remove --displayName 'Marketing Division'
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Response
|
|
51
|
+
|
|
52
|
+
The command won't return a response on success
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# aad group user list
|
|
6
|
+
|
|
7
|
+
Lists users of a specific Azure AD group
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 aad group user list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --groupId [groupId]`
|
|
19
|
+
: The ID of the Azure AD group. Specify `groupId` or `groupDisplayName` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
22
|
+
: The display name of the Azure AD group. Specify `groupId` or `groupDisplayName` but not both.
|
|
23
|
+
|
|
24
|
+
`-r, --role [role]`
|
|
25
|
+
: Filter the results to only users with the given role: `Owner`, `Member`.
|
|
26
|
+
|
|
27
|
+
`-p, --properties [properties]`
|
|
28
|
+
: Comma-separated list of properties to retrieve.
|
|
29
|
+
|
|
30
|
+
`-f, --filter [filter]`
|
|
31
|
+
: OData filter to use to query the list of users with.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
<Global />
|
|
35
|
+
|
|
36
|
+
## Remarks
|
|
37
|
+
|
|
38
|
+
When the `properties` option includes values with a `/`, for example: `manager/displayName`, an additional `$expand` query parameter will be included on `manager`.
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
List all group users from a group specified by ID.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 aad group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
List all owners from a group specified by display name.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 aad group user list --groupDisplayName Developers --role Owner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
List all group users from a group specified by name. For each one return the display name, e-mail address, and manager display name.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 aad group user list --groupDisplayName Developers --properties "displayName,mail,manager/displayName"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
List all group users from a group specified by name. For each one return the display name, e-mail address, and manager information.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 aad group user list --groupDisplayName Developers --properties "displayName,mail,manager/*"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
List all group members that are guest users.
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
m365 aad group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Response
|
|
73
|
+
|
|
74
|
+
<Tabs>
|
|
75
|
+
<TabItem value="JSON">
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
[
|
|
79
|
+
{
|
|
80
|
+
"id": "da52218e-4822-4ac6-b41d-255e2059655e",
|
|
81
|
+
"displayName": "Adele Vance",
|
|
82
|
+
"userPrincipalName": "AdeleV@contoso.OnMicrosoft.com",
|
|
83
|
+
"givenName": "Adele",
|
|
84
|
+
"surname": "Vance",
|
|
85
|
+
"roles": [
|
|
86
|
+
"Owner",
|
|
87
|
+
"Member"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
</TabItem>
|
|
94
|
+
<TabItem value="Text">
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
id displayName userPrincipalName roles
|
|
98
|
+
------------------------------------ -------------------- ------------------------------------ --------
|
|
99
|
+
da52218e-4822-4ac6-b41d-255e2059655e Adele Vance AdeleV@contoso.OnMicrosoft.com Owner,Member
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</TabItem>
|
|
103
|
+
<TabItem value="CSV">
|
|
104
|
+
|
|
105
|
+
```csv
|
|
106
|
+
id,displayName,userPrincipalName,givenName,surname
|
|
107
|
+
da52218e-4822-4ac6-b41d-255e2059655e,Adele Vance,AdeleV@contoso.OnMicrosoft.com,Adele,Vance
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
</TabItem>
|
|
111
|
+
<TabItem value="Markdown">
|
|
112
|
+
|
|
113
|
+
```md
|
|
114
|
+
# aad group user list --groupId "1deaa428-8dde-4043-b028-5492226d6114"
|
|
115
|
+
|
|
116
|
+
Date: 2023-10-02
|
|
117
|
+
|
|
118
|
+
## Adele Vance (da52218e-4822-4ac6-b41d-255e2059655e)
|
|
119
|
+
|
|
120
|
+
Property | Value
|
|
121
|
+
---------|-------
|
|
122
|
+
id | da52218e-4822-4ac6-b41d-255e2059655e
|
|
123
|
+
displayName | Adele Vance
|
|
124
|
+
userPrincipalName | AdeleV@contoso.OnMicrosoft.com
|
|
125
|
+
givenName | Adele
|
|
126
|
+
surname | Vance
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
</Tabs>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## More information
|
|
134
|
+
|
|
135
|
+
- View the documentation to see what userproperties can be included: [https://pnp.github.io/cli-microsoft365/cmd/aad/user/user-get#more-information](https://pnp.github.io/cli-microsoft365/cmd/aad/user/user-get#more-information)
|
|
@@ -27,7 +27,17 @@ m365 aad m365group remove [options]
|
|
|
27
27
|
|
|
28
28
|
## Remarks
|
|
29
29
|
|
|
30
|
-
If the specified _id_ doesn't refer to an existing group, you will get a `Resource does not exist` error.
|
|
30
|
+
If the specified _id_ doesn't refer to an existing group, you will get a `Resource does not exist` error. Additionally, if you do not have access to the group or the associated group-connected site, you will get an `Access denied` error.
|
|
31
|
+
|
|
32
|
+
When you use `--skipRecycleBin` flag to remove a Microsoft 365 group permanently, the process involves deleting the associated group-connected site and the group, and then checking if the group has been moved to the deleted groups list. In some cases, it may take a few seconds for the group to appear in the deleted groups list.
|
|
33
|
+
|
|
34
|
+
To ensure a smooth deletion process, the command employs a retry mechanism with the following parameters:
|
|
35
|
+
|
|
36
|
+
- `maxRetries`: This parameter is set to 10 by default. It specifies the maximum number of times the command will check if the group has been moved to the deleted groups list.
|
|
37
|
+
|
|
38
|
+
- `intervalInMs`: This parameter is set to 5000 milliseconds (5 seconds) by default. It defines the time interval between each retry attempt.
|
|
39
|
+
|
|
40
|
+
If the group is successfully moved to the deleted groups list within the specified number of retries, the command will then proceed to permanently remove it from the tenant. If the group cannot be removed after all retries, it will remain in the deleted groups list.
|
|
31
41
|
|
|
32
42
|
## Examples
|
|
33
43
|
|
|
@@ -31,7 +31,7 @@ m365 spo field get [options]
|
|
|
31
31
|
: The ID of the field to retrieve. Specify `id` or `title` but not both.
|
|
32
32
|
|
|
33
33
|
`-t, --title [title]`
|
|
34
|
-
: The display name (case-sensitive) of the field to
|
|
34
|
+
: The display name (case-sensitive) of the field to retrieve. Specify `id` or `title` but not both.
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
<Global />
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@pnp/cli-microsoft365",
|
|
9
|
-
"version": "7.
|
|
9
|
+
"version": "7.2.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@azure/msal-common": "^13.2.1",
|