@pnp/cli-microsoft365 7.3.0 → 7.4.0-beta.b16adf9
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/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/aad/commands/m365group/m365group-user-list.js +80 -24
- package/dist/m365/pa/commands/app/app-get.js +26 -11
- package/dist/m365/pa/commands/app/app-remove.js +19 -2
- package/docs/docs/cmd/aad/m365group/m365group-user-list.mdx +41 -15
- package/docs/docs/cmd/pa/app/app-get.mdx +15 -0
- package/docs/docs/cmd/pa/app/app-remove.mdx +14 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
3
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
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
|
-
var _AadM365GroupUserListCommand_instances, _AadM365GroupUserListCommand_initTelemetry, _AadM365GroupUserListCommand_initOptions, _AadM365GroupUserListCommand_initValidators;
|
|
6
|
+
var _AadM365GroupUserListCommand_instances, _AadM365GroupUserListCommand_initTelemetry, _AadM365GroupUserListCommand_initOptions, _AadM365GroupUserListCommand_initOptionSets, _AadM365GroupUserListCommand_initValidators;
|
|
7
7
|
import { odata } from '../../../../utils/odata.js';
|
|
8
8
|
import { validation } from '../../../../utils/validation.js';
|
|
9
9
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
@@ -21,18 +21,35 @@ class AadM365GroupUserListCommand extends GraphCommand {
|
|
|
21
21
|
_AadM365GroupUserListCommand_instances.add(this);
|
|
22
22
|
__classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initTelemetry).call(this);
|
|
23
23
|
__classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initOptions).call(this);
|
|
24
|
+
__classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initOptionSets).call(this);
|
|
24
25
|
__classPrivateFieldGet(this, _AadM365GroupUserListCommand_instances, "m", _AadM365GroupUserListCommand_initValidators).call(this);
|
|
25
26
|
}
|
|
26
27
|
async commandAction(logger, args) {
|
|
27
28
|
try {
|
|
28
|
-
|
|
29
|
+
if (args.options.role === 'Guest') {
|
|
30
|
+
this.warn(logger, `Value 'Guest' for the option role is deprecated. Use --filter "userType eq 'Guest'" instead.`);
|
|
31
|
+
}
|
|
32
|
+
const groupId = await this.getGroupId(args.options, logger);
|
|
33
|
+
const isUnifiedGroup = await aadGroup.isUnifiedGroup(groupId);
|
|
29
34
|
if (!isUnifiedGroup) {
|
|
30
|
-
throw Error(`Specified group
|
|
35
|
+
throw Error(`Specified group '${args.options.groupId || args.options.groupDisplayName}' is not a Microsoft 365 group.`);
|
|
36
|
+
}
|
|
37
|
+
let users = [];
|
|
38
|
+
if (!args.options.role || args.options.role === 'Owner') {
|
|
39
|
+
const owners = await this.getUsers(args.options, 'Owners', groupId, logger);
|
|
40
|
+
owners.forEach(owner => users.push({ ...owner, roles: ['Owner'], userType: 'Owner' }));
|
|
31
41
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
42
|
+
if (!args.options.role || args.options.role === 'Member' || args.options.role === 'Guest') {
|
|
43
|
+
const members = await this.getUsers(args.options, 'Members', groupId, logger);
|
|
44
|
+
members.forEach((member) => {
|
|
45
|
+
const user = users.find((u) => u.id === member.id);
|
|
46
|
+
if (user !== undefined) {
|
|
47
|
+
user.roles.push('Member');
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
users.push({ ...member, roles: ['Member'] });
|
|
51
|
+
}
|
|
52
|
+
});
|
|
36
53
|
}
|
|
37
54
|
if (args.options.role) {
|
|
38
55
|
users = users.filter(i => i.userType === args.options.role);
|
|
@@ -43,43 +60,82 @@ class AadM365GroupUserListCommand extends GraphCommand {
|
|
|
43
60
|
this.handleRejectedODataJsonPromise(err);
|
|
44
61
|
}
|
|
45
62
|
}
|
|
46
|
-
async
|
|
63
|
+
async getGroupId(options, logger) {
|
|
64
|
+
if (options.groupId) {
|
|
65
|
+
return options.groupId;
|
|
66
|
+
}
|
|
47
67
|
if (this.verbose) {
|
|
48
|
-
await logger.logToStderr(
|
|
68
|
+
await logger.logToStderr('Retrieving Group Id...');
|
|
49
69
|
}
|
|
50
|
-
|
|
51
|
-
const users = await odata.getAllItems(endpoint);
|
|
52
|
-
// Currently there is a bug in the Microsoft Graph that returns Owners as
|
|
53
|
-
// userType 'member'. We therefore update all returned user as owner
|
|
54
|
-
users.forEach(user => {
|
|
55
|
-
user.userType = 'Owner';
|
|
56
|
-
});
|
|
57
|
-
return users;
|
|
70
|
+
return await aadGroup.getGroupIdByDisplayName(options.groupDisplayName);
|
|
58
71
|
}
|
|
59
|
-
async
|
|
72
|
+
async getUsers(options, role, groupId, logger) {
|
|
73
|
+
const { properties, filter } = options;
|
|
60
74
|
if (this.verbose) {
|
|
61
|
-
await logger.logToStderr(`Retrieving
|
|
75
|
+
await logger.logToStderr(`Retrieving ${role} of the group with id ${groupId}`);
|
|
76
|
+
}
|
|
77
|
+
const selectProperties = properties ?
|
|
78
|
+
`${properties.split(',').filter(f => f.toLowerCase() !== 'id').concat('id').map(p => p.trim()).join(',')}` :
|
|
79
|
+
'id,displayName,userPrincipalName,givenName,surname,userType';
|
|
80
|
+
const allSelectProperties = selectProperties.split(',');
|
|
81
|
+
const propertiesWithSlash = allSelectProperties.filter(item => item.includes('/'));
|
|
82
|
+
const fieldsToExpand = [];
|
|
83
|
+
propertiesWithSlash.forEach(p => {
|
|
84
|
+
const propertiesSplit = p.split('/');
|
|
85
|
+
fieldsToExpand.push(`${propertiesSplit[0]}($select=${propertiesSplit[1]})`);
|
|
86
|
+
});
|
|
87
|
+
const fieldExpand = fieldsToExpand.join(',');
|
|
88
|
+
const expandParam = fieldExpand.length > 0 ? `&$expand=${fieldExpand}` : '';
|
|
89
|
+
const selectParam = allSelectProperties.filter(item => !item.includes('/'));
|
|
90
|
+
const endpoint = `${this.resource}/v1.0/groups/${groupId}/${role}/microsoft.graph.user?$select=${selectParam}${expandParam}`;
|
|
91
|
+
if (filter) {
|
|
92
|
+
// While using the filter, we need to specify the ConsistencyLevel header.
|
|
93
|
+
// Can be refactored when the header is no longer necessary.
|
|
94
|
+
const requestOptions = {
|
|
95
|
+
url: `${endpoint}&$filter=${encodeURIComponent(filter)}&$count=true`,
|
|
96
|
+
headers: {
|
|
97
|
+
accept: 'application/json;odata.metadata=none',
|
|
98
|
+
ConsistencyLevel: 'eventual'
|
|
99
|
+
},
|
|
100
|
+
responseType: 'json'
|
|
101
|
+
};
|
|
102
|
+
return await odata.getAllItems(requestOptions);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
return await odata.getAllItems(endpoint);
|
|
62
106
|
}
|
|
63
|
-
const endpoint = `${this.resource}/v1.0/groups/${groupId}/members?$select=id,displayName,userPrincipalName,userType`;
|
|
64
|
-
return await odata.getAllItems(endpoint);
|
|
65
107
|
}
|
|
66
108
|
}
|
|
67
109
|
_AadM365GroupUserListCommand_instances = new WeakSet(), _AadM365GroupUserListCommand_initTelemetry = function _AadM365GroupUserListCommand_initTelemetry() {
|
|
68
110
|
this.telemetry.push((args) => {
|
|
69
111
|
Object.assign(this.telemetryProperties, {
|
|
70
|
-
|
|
112
|
+
groupId: typeof args.options.groupId !== 'undefined',
|
|
113
|
+
groupDisplayName: typeof args.options.groupDisplayName !== 'undefined',
|
|
114
|
+
role: typeof args.options.role !== 'undefined',
|
|
115
|
+
properties: typeof args.options.properties !== 'undefined',
|
|
116
|
+
filter: typeof args.options.filter !== 'undefined'
|
|
71
117
|
});
|
|
72
118
|
});
|
|
73
119
|
}, _AadM365GroupUserListCommand_initOptions = function _AadM365GroupUserListCommand_initOptions() {
|
|
74
120
|
this.options.unshift({
|
|
75
|
-
option: "-i, --groupId
|
|
121
|
+
option: "-i, --groupId [groupId]"
|
|
122
|
+
}, {
|
|
123
|
+
option: "-n, --groupDisplayName [groupDisplayName]"
|
|
76
124
|
}, {
|
|
77
125
|
option: "-r, --role [type]",
|
|
78
126
|
autocomplete: ["Owner", "Member", "Guest"]
|
|
127
|
+
}, {
|
|
128
|
+
option: "-p, --properties [properties]"
|
|
129
|
+
}, {
|
|
130
|
+
option: "-f, --filter [filter]"
|
|
131
|
+
});
|
|
132
|
+
}, _AadM365GroupUserListCommand_initOptionSets = function _AadM365GroupUserListCommand_initOptionSets() {
|
|
133
|
+
this.optionSets.push({
|
|
134
|
+
options: ['groupId', 'groupDisplayName']
|
|
79
135
|
});
|
|
80
136
|
}, _AadM365GroupUserListCommand_initValidators = function _AadM365GroupUserListCommand_initValidators() {
|
|
81
137
|
this.validators.push(async (args) => {
|
|
82
|
-
if (!validation.isValidGuid(args.options.groupId)) {
|
|
138
|
+
if (args.options.groupId && !validation.isValidGuid(args.options.groupId)) {
|
|
83
139
|
return `${args.options.groupId} is not a valid GUID`;
|
|
84
140
|
}
|
|
85
141
|
if (args.options.role) {
|
|
@@ -32,8 +32,13 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
32
32
|
async commandAction(logger, args) {
|
|
33
33
|
try {
|
|
34
34
|
if (args.options.name) {
|
|
35
|
+
let endpoint = `${this.resource}/providers/Microsoft.PowerApps`;
|
|
36
|
+
if (args.options.asAdmin) {
|
|
37
|
+
endpoint += `/scopes/admin/environments/${formatting.encodeQueryParameter(args.options.environmentName)}`;
|
|
38
|
+
}
|
|
39
|
+
endpoint += `/apps/${formatting.encodeQueryParameter(args.options.name)}?api-version=2016-11-01`;
|
|
35
40
|
const requestOptions = {
|
|
36
|
-
url:
|
|
41
|
+
url: endpoint,
|
|
37
42
|
headers: {
|
|
38
43
|
accept: 'application/json'
|
|
39
44
|
},
|
|
@@ -50,8 +55,8 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
50
55
|
await logger.logToStderr(`Retrieving information about Microsoft Power App with displayName '${args.options.displayName}'...`);
|
|
51
56
|
}
|
|
52
57
|
const getAppsOutput = await this.getApps(args, logger);
|
|
53
|
-
|
|
54
|
-
|
|
58
|
+
if (getAppsOutput.stdout && JSON.parse(getAppsOutput.stdout).length > 0) {
|
|
59
|
+
const allApps = JSON.parse(getAppsOutput.stdout);
|
|
55
60
|
const app = allApps.find((a) => {
|
|
56
61
|
return a.properties.displayName.toLowerCase() === `${args.options.displayName}`.toLowerCase();
|
|
57
62
|
});
|
|
@@ -59,15 +64,11 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
59
64
|
await logger.log(this.setProperties(app));
|
|
60
65
|
}
|
|
61
66
|
else {
|
|
62
|
-
|
|
63
|
-
await logger.logToStderr(`No app found with displayName '${args.options.displayName}'`);
|
|
64
|
-
}
|
|
67
|
+
throw `No app found with displayName '${args.options.displayName}'.`;
|
|
65
68
|
}
|
|
66
69
|
}
|
|
67
70
|
else {
|
|
68
|
-
|
|
69
|
-
await logger.logToStderr('No apps found');
|
|
70
|
-
}
|
|
71
|
+
throw 'No apps found.';
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
}
|
|
@@ -82,7 +83,9 @@ class PaAppGetCommand extends PowerAppsCommand {
|
|
|
82
83
|
const options = {
|
|
83
84
|
output: 'json',
|
|
84
85
|
debug: this.debug,
|
|
85
|
-
verbose: this.verbose
|
|
86
|
+
verbose: this.verbose,
|
|
87
|
+
environmentName: args.options.environmentName,
|
|
88
|
+
asAdmin: args.options.asAdmin
|
|
86
89
|
};
|
|
87
90
|
return await cli.executeCommandWithOutput(paAppListCommand, { options: { ...options, _: [] } });
|
|
88
91
|
}
|
|
@@ -98,7 +101,9 @@ _PaAppGetCommand_instances = new WeakSet(), _PaAppGetCommand_initTelemetry = fun
|
|
|
98
101
|
this.telemetry.push((args) => {
|
|
99
102
|
Object.assign(this.telemetryProperties, {
|
|
100
103
|
name: typeof args.options.name !== 'undefined',
|
|
101
|
-
displayName: typeof args.options.displayName !== 'undefined'
|
|
104
|
+
displayName: typeof args.options.displayName !== 'undefined',
|
|
105
|
+
asAdmin: !!args.options.asAdmin,
|
|
106
|
+
environmentName: typeof args.options.environmentName !== 'undefined'
|
|
102
107
|
});
|
|
103
108
|
});
|
|
104
109
|
}, _PaAppGetCommand_initOptions = function _PaAppGetCommand_initOptions() {
|
|
@@ -106,12 +111,22 @@ _PaAppGetCommand_instances = new WeakSet(), _PaAppGetCommand_initTelemetry = fun
|
|
|
106
111
|
option: '-n, --name [name]'
|
|
107
112
|
}, {
|
|
108
113
|
option: '-d, --displayName [displayName]'
|
|
114
|
+
}, {
|
|
115
|
+
option: '-e, --environmentName [environmentName]'
|
|
116
|
+
}, {
|
|
117
|
+
option: '--asAdmin'
|
|
109
118
|
});
|
|
110
119
|
}, _PaAppGetCommand_initValidators = function _PaAppGetCommand_initValidators() {
|
|
111
120
|
this.validators.push(async (args) => {
|
|
112
121
|
if (args.options.name && !validation.isValidGuid(args.options.name)) {
|
|
113
122
|
return `${args.options.name} is not a valid GUID`;
|
|
114
123
|
}
|
|
124
|
+
if (args.options.asAdmin && !args.options.environmentName) {
|
|
125
|
+
return 'When specifying the asAdmin option, the environment option is required as well.';
|
|
126
|
+
}
|
|
127
|
+
if (args.options.environmentName && !args.options.asAdmin) {
|
|
128
|
+
return 'When specifying the environment option, the asAdmin option is required as well.';
|
|
129
|
+
}
|
|
115
130
|
return true;
|
|
116
131
|
});
|
|
117
132
|
}, _PaAppGetCommand_initOptionSets = function _PaAppGetCommand_initOptionSets() {
|
|
@@ -30,8 +30,13 @@ class PaAppRemoveCommand extends PowerAppsCommand {
|
|
|
30
30
|
await logger.logToStderr(`Removing Microsoft Power App ${args.options.name}...`);
|
|
31
31
|
}
|
|
32
32
|
const removePaApp = async () => {
|
|
33
|
+
let endpoint = `${this.resource}/providers/Microsoft.PowerApps`;
|
|
34
|
+
if (args.options.asAdmin) {
|
|
35
|
+
endpoint += `/scopes/admin/environments/${formatting.encodeQueryParameter(args.options.environmentName)}`;
|
|
36
|
+
}
|
|
37
|
+
endpoint += `/apps/${formatting.encodeQueryParameter(args.options.name)}?api-version=2017-08-01`;
|
|
33
38
|
const requestOptions = {
|
|
34
|
-
url:
|
|
39
|
+
url: endpoint,
|
|
35
40
|
fullResponse: true,
|
|
36
41
|
headers: {
|
|
37
42
|
accept: 'application/json'
|
|
@@ -64,7 +69,9 @@ class PaAppRemoveCommand extends PowerAppsCommand {
|
|
|
64
69
|
_PaAppRemoveCommand_instances = new WeakSet(), _PaAppRemoveCommand_initTelemetry = function _PaAppRemoveCommand_initTelemetry() {
|
|
65
70
|
this.telemetry.push((args) => {
|
|
66
71
|
Object.assign(this.telemetryProperties, {
|
|
67
|
-
force: typeof args.options.force !== 'undefined'
|
|
72
|
+
force: typeof args.options.force !== 'undefined',
|
|
73
|
+
asAdmin: !!args.options.asAdmin,
|
|
74
|
+
environmentName: typeof args.options.environmentName !== 'undefined'
|
|
68
75
|
});
|
|
69
76
|
});
|
|
70
77
|
}, _PaAppRemoveCommand_initOptions = function _PaAppRemoveCommand_initOptions() {
|
|
@@ -72,12 +79,22 @@ _PaAppRemoveCommand_instances = new WeakSet(), _PaAppRemoveCommand_initTelemetry
|
|
|
72
79
|
option: '-n, --name <name>'
|
|
73
80
|
}, {
|
|
74
81
|
option: '-f, --force'
|
|
82
|
+
}, {
|
|
83
|
+
option: '--asAdmin'
|
|
84
|
+
}, {
|
|
85
|
+
option: '-e, --environmentName [environmentName]'
|
|
75
86
|
});
|
|
76
87
|
}, _PaAppRemoveCommand_initValidators = function _PaAppRemoveCommand_initValidators() {
|
|
77
88
|
this.validators.push(async (args) => {
|
|
78
89
|
if (!validation.isValidGuid(args.options.name)) {
|
|
79
90
|
return `${args.options.name} is not a valid GUID`;
|
|
80
91
|
}
|
|
92
|
+
if (args.options.asAdmin && !args.options.environmentName) {
|
|
93
|
+
return 'When specifying the asAdmin option, the environment option is required as well.';
|
|
94
|
+
}
|
|
95
|
+
if (args.options.environmentName && !args.options.asAdmin) {
|
|
96
|
+
return 'When specifying the environment option, the asAdmin option is required as well.';
|
|
97
|
+
}
|
|
81
98
|
return true;
|
|
82
99
|
});
|
|
83
100
|
};
|
|
@@ -15,33 +15,52 @@ m365 aad m365group user list [options]
|
|
|
15
15
|
## Options
|
|
16
16
|
|
|
17
17
|
```md definition-list
|
|
18
|
-
`-i, --groupId
|
|
19
|
-
: The ID of the Microsoft 365 group
|
|
18
|
+
`-i, --groupId [groupId]`
|
|
19
|
+
: The ID of the Microsoft 365 group. Specify `groupId` or `groupDisplayName` but not both.
|
|
20
|
+
|
|
21
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
22
|
+
: The display name of the Microsoft 365 group. Specify `groupId` or `groupDisplayName` but not both.
|
|
20
23
|
|
|
21
24
|
`-r, --role [role]`
|
|
22
|
-
: Filter the results to only users with the given role: `Owner`, `Member`, `Guest
|
|
25
|
+
: Filter the results to only users with the given role. Allowed values: `Owner`, `Member`, or (Deprecated) `Guest`.
|
|
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.
|
|
23
32
|
```
|
|
24
33
|
|
|
25
34
|
<Global />
|
|
26
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
|
+
|
|
27
40
|
## Examples
|
|
28
41
|
|
|
29
|
-
List all users and their role
|
|
42
|
+
List all users and their role from Microsoft 365 group specified by ID.
|
|
30
43
|
|
|
31
44
|
```sh
|
|
32
|
-
m365 aad m365group user list --groupId
|
|
45
|
+
m365 aad m365group user list --groupId 00000000-0000-0000-0000-000000000000
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
List all owners from Microsoft 365 group specified by display name.
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
m365 aad m365group user list --groupDisplayName Developers --role Owner
|
|
33
52
|
```
|
|
34
53
|
|
|
35
|
-
List all
|
|
54
|
+
List specific properties for all group users from a group specified by ID.
|
|
36
55
|
|
|
37
56
|
```sh
|
|
38
|
-
m365 aad m365group user list --groupId
|
|
57
|
+
m365 aad m365group user list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe --properties "id,jobTitle,companyName,accountEnabled"
|
|
39
58
|
```
|
|
40
59
|
|
|
41
|
-
|
|
60
|
+
List all group members that are guest users.
|
|
42
61
|
|
|
43
62
|
```sh
|
|
44
|
-
m365 aad m365group user list --
|
|
63
|
+
m365 aad m365group user list --groupDisplayName Developers --filter "userType eq 'Guest'"
|
|
45
64
|
```
|
|
46
65
|
|
|
47
66
|
## Response
|
|
@@ -55,7 +74,12 @@ m365 aad m365group user list --groupId '00000000-0000-0000-0000-000000000000' --
|
|
|
55
74
|
"id": "da52218e-4822-4ac6-b41d-255e2059655e",
|
|
56
75
|
"displayName": "Adele Vance",
|
|
57
76
|
"userPrincipalName": "AdeleV@contoso.OnMicrosoft.com",
|
|
58
|
-
"
|
|
77
|
+
"givenName": "Adele",
|
|
78
|
+
"surname": "Vance",
|
|
79
|
+
"roles": [
|
|
80
|
+
"Owner",
|
|
81
|
+
"Member"
|
|
82
|
+
]
|
|
59
83
|
}
|
|
60
84
|
]
|
|
61
85
|
```
|
|
@@ -64,17 +88,17 @@ m365 aad m365group user list --groupId '00000000-0000-0000-0000-000000000000' --
|
|
|
64
88
|
<TabItem value="Text">
|
|
65
89
|
|
|
66
90
|
```text
|
|
67
|
-
id displayName userPrincipalName userType
|
|
68
|
-
------------------------------------ -------------------- ------------------------------------ --------
|
|
69
|
-
da52218e-4822-4ac6-b41d-255e2059655e Adele Vance AdeleV@contoso.OnMicrosoft.com Member
|
|
91
|
+
id displayName userPrincipalName userType roles
|
|
92
|
+
------------------------------------ -------------------- ------------------------------------ -------- --------
|
|
93
|
+
da52218e-4822-4ac6-b41d-255e2059655e Adele Vance AdeleV@contoso.OnMicrosoft.com Owner,Member Owner,Member
|
|
70
94
|
```
|
|
71
95
|
|
|
72
96
|
</TabItem>
|
|
73
97
|
<TabItem value="CSV">
|
|
74
98
|
|
|
75
99
|
```csv
|
|
76
|
-
id,displayName,userPrincipalName,userType
|
|
77
|
-
da52218e-4822-4ac6-b41d-255e2059655e,Adele Vance,AdeleV@contoso.OnMicrosoft.com,Member
|
|
100
|
+
id,displayName,userPrincipalName,givenName,surname,userType
|
|
101
|
+
da52218e-4822-4ac6-b41d-255e2059655e,Adele Vance,AdeleV@contoso.OnMicrosoft.com,Adele,Vance,Member
|
|
78
102
|
```
|
|
79
103
|
|
|
80
104
|
</TabItem>
|
|
@@ -91,6 +115,8 @@ m365 aad m365group user list --groupId '00000000-0000-0000-0000-000000000000' --
|
|
|
91
115
|
---------|-------
|
|
92
116
|
id | da52218e-4822-4ac6-b41d-255e2059655e
|
|
93
117
|
displayName | Adele Vance
|
|
118
|
+
givenName | Adele
|
|
119
|
+
surname | Vance
|
|
94
120
|
userPrincipalName | AdeleV@contoso.OnMicrosoft.com
|
|
95
121
|
userType | Member
|
|
96
122
|
```
|
|
@@ -20,6 +20,12 @@ m365 pa app get [options]
|
|
|
20
20
|
|
|
21
21
|
`-d, --displayName [displayName]`
|
|
22
22
|
: The display name of the Microsoft Power App to get information about.
|
|
23
|
+
|
|
24
|
+
`--asAdmin`
|
|
25
|
+
: Run the command as admin for apps you don't have permission to.
|
|
26
|
+
|
|
27
|
+
`-e, --environmentName [environmentName]`
|
|
28
|
+
: The name of the environment. Required when using `asAdmin`.
|
|
23
29
|
```
|
|
24
30
|
|
|
25
31
|
<Global />
|
|
@@ -32,6 +38,9 @@ This command is based on an API that is currently in preview and is subject to c
|
|
|
32
38
|
|
|
33
39
|
:::
|
|
34
40
|
|
|
41
|
+
As a maker, you are able to retrieve the Power Apps you have permission to. As an administrator, you are also able to retrieve Power Apps from other users you don't have permission to. To get the app from another user, use the `asAdmin` option and make sure to specify the `environment` option as well.
|
|
42
|
+
|
|
43
|
+
|
|
35
44
|
If you try to retrieve a non-existing Microsoft Power App, you will get the `Request failed with status code 404` error.
|
|
36
45
|
|
|
37
46
|
## Examples
|
|
@@ -48,6 +57,12 @@ Get information about the specified Microsoft Power App by the app's display nam
|
|
|
48
57
|
m365 pa app get --displayName App
|
|
49
58
|
```
|
|
50
59
|
|
|
60
|
+
Get information about the specific app you do not have access to.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 pa app get --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
|
|
64
|
+
```
|
|
65
|
+
|
|
51
66
|
## Response
|
|
52
67
|
|
|
53
68
|
<Tabs>
|
|
@@ -18,6 +18,12 @@ m365 pa app remove [options]
|
|
|
18
18
|
|
|
19
19
|
`-f, --force`
|
|
20
20
|
: Don't prompt for confirmation
|
|
21
|
+
|
|
22
|
+
`--asAdmin`
|
|
23
|
+
: Run the command as admin for apps you don't own.
|
|
24
|
+
|
|
25
|
+
`-e, --environmentName [environmentName]`
|
|
26
|
+
: The name of the environment. Required when using `asAdmin`.
|
|
21
27
|
```
|
|
22
28
|
|
|
23
29
|
<Global />
|
|
@@ -26,6 +32,8 @@ m365 pa app remove [options]
|
|
|
26
32
|
|
|
27
33
|
By default, the command will try to remove a Power App. As maker, you are able to delete the Power Apps you own. As administrator, you are also able to delete Power Apps from other users.
|
|
28
34
|
|
|
35
|
+
To remove an app you do not own, use the `asAdmin` option and make sure to specify the `environmentName` option as well.
|
|
36
|
+
|
|
29
37
|
To remove a model-driven Power App you need administrator permissions.
|
|
30
38
|
|
|
31
39
|
If the Power App with the name you specified doesn't exist, you will get the `Error: App 'abc' does not exist` error.
|
|
@@ -44,6 +52,12 @@ Removes the specified Power App without confirmation
|
|
|
44
52
|
m365 pa app remove --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --force
|
|
45
53
|
```
|
|
46
54
|
|
|
55
|
+
Removes the specified Power App you don't own
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
m365 pa app remove --name 3989cb59-ce1a-4a5c-bb78-257c5c39381d --environmentName Default-d87a7535-dd31-4437-bfe1-95340acd55c5 --asAdmin
|
|
59
|
+
```
|
|
60
|
+
|
|
47
61
|
## Response
|
|
48
62
|
|
|
49
63
|
The command won't return a response on success.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.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.4.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@azure/msal-common": "^14.5.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnp/cli-microsoft365",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0-beta.b16adf9",
|
|
4
4
|
"description": "Manage Microsoft 365 and SharePoint Framework projects on any platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/api.js",
|
|
@@ -301,4 +301,4 @@
|
|
|
301
301
|
"sinon": "^17.0.0",
|
|
302
302
|
"source-map-support": "^0.5.21"
|
|
303
303
|
}
|
|
304
|
-
}
|
|
304
|
+
}
|