@pnp/cli-microsoft365 10.0.0-beta.d54aaac → 10.0.0-beta.da65889
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/Auth.js +3 -3
- package/dist/AuthServer.js +7 -7
- package/dist/api.js +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/cli/commands/cli-doctor.js +2 -2
- package/dist/m365/cli/commands.js +1 -2
- package/dist/m365/commands/login.js +120 -67
- package/dist/m365/entra/commands/group/{group-user-add.js → group-member-add.js} +18 -18
- package/dist/m365/entra/commands/group/{group-user-list.js → group-member-list.js} +17 -17
- package/dist/m365/entra/commands/group/{group-user-set.js → group-member-set.js} +19 -19
- package/dist/m365/entra/commands/m365group/m365group-set.js +24 -16
- package/dist/m365/entra/commands/m365group/m365group-user-add.js +5 -12
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +3 -12
- package/dist/m365/entra/commands.js +3 -3
- package/dist/m365/external/commands/item/item-add.js +2 -5
- package/dist/m365/flow/commands/environment/environment-list.js +1 -1
- package/dist/m365/pa/commands/app/app-list.js +1 -6
- package/dist/m365/pa/commands/connector/connector-list.js +1 -6
- package/dist/m365/pa/commands/environment/environment-list.js +1 -1
- package/dist/m365/pp/commands/environment/environment-list.js +1 -1
- package/dist/m365/spfx/commands/project/project-doctor/{doctor-1.20.0-rc.1.js → doctor-1.20.0.js} +4 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN002021_DEVDEP_rushstack_eslint_config.js +10 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +1 -1
- package/dist/m365/spfx/commands/project/project-upgrade/{upgrade-1.20.0-rc.1.js → upgrade-1.20.0.js} +28 -26
- package/dist/m365/spfx/commands/project/project-upgrade.js +13 -15
- package/dist/m365/spfx/commands/spfx-doctor.js +1 -1
- package/dist/m365/spo/commands/app/app-instance-list.js +3 -18
- package/dist/m365/spo/commands/app/app-list.js +1 -8
- package/dist/m365/spo/commands/feature/feature-list.js +1 -8
- package/dist/m365/spo/commands/file/file-copy.js +5 -1
- package/dist/m365/spo/commands/file/file-move.js +55 -33
- package/dist/m365/spo/commands/list/list-webhook-list.js +1 -6
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +1 -8
- package/dist/m365/spo/commands/page/page-list.js +1 -1
- package/dist/m365/spo/commands/page/page-remove.js +37 -16
- package/dist/m365/spo/commands/page/page-template-list.js +1 -3
- package/dist/m365/spo/commands/site/site-admin-list.js +8 -9
- package/dist/m365/spo/commands/site/site-admin-remove.js +5 -4
- package/dist/m365/spo/commands/site/site-sharingpermission-set.js +68 -0
- package/dist/m365/spo/commands/sitescript/sitescript-get.js +3 -2
- package/dist/m365/spo/commands/sitescript/sitescript-list.js +1 -3
- package/dist/m365/spo/commands/{site/site-rename.js → tenant/tenant-site-rename.js} +29 -32
- package/dist/m365/spo/commands/theme/theme-list.js +1 -1
- package/dist/m365/spo/commands/web/web-clientsidewebpart-list.js +1 -6
- package/dist/m365/spo/commands.js +2 -1
- package/dist/m365/teams/commands/tab/tab-list.js +5 -3
- package/dist/m365/viva/commands/engage/Community.js +2 -0
- package/dist/m365/viva/commands/engage/engage-community-list.js +28 -0
- package/dist/m365/viva/commands.js +1 -0
- package/dist/request.js +46 -61
- package/dist/utils/spo.js +8 -8
- package/dist/utils/timersUtil.js +12 -0
- package/dist/utils/urlUtil.js +8 -0
- package/docs/docs/cmd/cli/cli-doctor.mdx +24 -23
- package/docs/docs/cmd/entra/group/group-member-add.mdx +62 -0
- package/docs/docs/cmd/entra/group/{group-user-list.mdx → group-member-list.mdx} +14 -14
- package/docs/docs/cmd/entra/group/group-member-set.mdx +62 -0
- package/docs/docs/cmd/entra/m365group/m365group-set.mdx +9 -6
- package/docs/docs/cmd/entra/m365group/m365group-user-add.mdx +0 -3
- package/docs/docs/cmd/external/item/item-add.mdx +3 -3
- package/docs/docs/cmd/login.mdx +9 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spo/file/file-move.mdx +116 -9
- package/docs/docs/cmd/spo/page/page-remove.mdx +30 -12
- package/docs/docs/cmd/spo/site/site-admin-list.mdx +64 -12
- package/docs/docs/cmd/spo/site/site-sharingpermission-set.mdx +58 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +14 -1
- package/docs/docs/cmd/spo/{site/site-rename.mdx → tenant/tenant-site-rename.mdx} +7 -7
- package/docs/docs/cmd/teams/tab/tab-list.mdx +1 -2
- package/docs/docs/cmd/viva/engage/engage-community-list.mdx +81 -0
- package/package.json +1 -1
- package/dist/m365/cli/commands/cli-reconsent.js +0 -29
- package/docs/docs/cmd/cli/cli-reconsent.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-add.mdx +0 -62
- package/docs/docs/cmd/entra/group/group-user-set.mdx +0 -62
|
@@ -29,9 +29,11 @@ class TeamsTabListCommand extends GraphCommand {
|
|
|
29
29
|
const endpoint = `${this.resource}/v1.0/teams/${args.options.teamId}/channels/${formatting.encodeQueryParameter(args.options.channelId)}/tabs?$expand=teamsApp`;
|
|
30
30
|
try {
|
|
31
31
|
const items = await odata.getAllItems(endpoint);
|
|
32
|
-
|
|
33
|
-
i
|
|
34
|
-
|
|
32
|
+
if (args.options.output !== 'json') {
|
|
33
|
+
items.forEach(i => {
|
|
34
|
+
i.teamsAppTabId = i.teamsApp.id;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
35
37
|
await logger.log(items);
|
|
36
38
|
}
|
|
37
39
|
catch (err) {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { odata } from '../../../../utils/odata.js';
|
|
2
|
+
import GraphCommand from '../../../base/GraphCommand.js';
|
|
3
|
+
import commands from '../../commands.js';
|
|
4
|
+
class VivaEngageCommunityListCommand extends GraphCommand {
|
|
5
|
+
get name() {
|
|
6
|
+
return commands.ENGAGE_COMMUNITY_LIST;
|
|
7
|
+
}
|
|
8
|
+
get description() {
|
|
9
|
+
return 'Lists all Viva Engage communities';
|
|
10
|
+
}
|
|
11
|
+
defaultProperties() {
|
|
12
|
+
return ['id', 'displayName', 'privacy'];
|
|
13
|
+
}
|
|
14
|
+
async commandAction(logger) {
|
|
15
|
+
if (this.verbose) {
|
|
16
|
+
await logger.logToStderr('Getting all Viva Engage communities...');
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
const results = await odata.getAllItems(`${this.resource}/v1.0/employeeExperience/communities`);
|
|
20
|
+
await logger.log(results);
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
this.handleRejectedODataJsonPromise(err);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default new VivaEngageCommunityListCommand();
|
|
28
|
+
//# sourceMappingURL=engage-community-list.js.map
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
CONNECTIONS_APP_CREATE: `${prefix} connections app create`,
|
|
4
4
|
ENGAGE_COMMUNITY_ADD: `${prefix} engage community add`,
|
|
5
5
|
ENGAGE_COMMUNITY_GET: `${prefix} engage community get`,
|
|
6
|
+
ENGAGE_COMMUNITY_LIST: `${prefix} engage community list`,
|
|
6
7
|
ENGAGE_GROUP_LIST: `${prefix} engage group list`,
|
|
7
8
|
ENGAGE_GROUP_USER_ADD: `${prefix} engage group user add`,
|
|
8
9
|
ENGAGE_GROUP_USER_REMOVE: `${prefix} engage group user remove`,
|
package/dist/request.js
CHANGED
|
@@ -4,6 +4,7 @@ import auth, { Auth } from './Auth.js';
|
|
|
4
4
|
import { app } from './utils/app.js';
|
|
5
5
|
import { formatting } from './utils/formatting.js';
|
|
6
6
|
import { timings } from './cli/timings.js';
|
|
7
|
+
import { timersUtil } from './utils/timersUtil.js';
|
|
7
8
|
class Request {
|
|
8
9
|
set debug(debug) {
|
|
9
10
|
// if the value to set is the same as current value return early to avoid
|
|
@@ -125,76 +126,60 @@ class Request {
|
|
|
125
126
|
options.method = 'HEAD';
|
|
126
127
|
return this.execute(options);
|
|
127
128
|
}
|
|
128
|
-
execute(options
|
|
129
|
+
async execute(options) {
|
|
129
130
|
const start = process.hrtime.bigint();
|
|
130
131
|
if (!this._logger) {
|
|
131
|
-
|
|
132
|
+
throw 'Logger not set on the request object';
|
|
132
133
|
}
|
|
133
134
|
this.updateRequestForCloudType(options, auth.connection.cloudType);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.
|
|
146
|
-
|
|
147
|
-
if (options.headers['x-anonymous']) {
|
|
148
|
-
delete options.headers['x-anonymous'];
|
|
149
|
-
}
|
|
150
|
-
if (options.headers['x-resource']) {
|
|
151
|
-
delete options.headers['x-resource'];
|
|
152
|
-
}
|
|
153
|
-
if (accessToken !== '') {
|
|
154
|
-
options.headers.authorization = `Bearer ${accessToken}`;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
158
|
-
if (proxyUrl) {
|
|
159
|
-
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
135
|
+
try {
|
|
136
|
+
let accessToken = '';
|
|
137
|
+
if (options.headers && options.headers['x-anonymous']) {
|
|
138
|
+
accessToken = '';
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
const url = options.headers && options.headers['x-resource'] ? options.headers['x-resource'] : options.url;
|
|
142
|
+
const resource = Auth.getResourceFromUrl(url);
|
|
143
|
+
accessToken = await auth.ensureAccessToken(resource, this._logger, this._debug);
|
|
144
|
+
}
|
|
145
|
+
if (options.headers) {
|
|
146
|
+
if (options.headers['x-anonymous']) {
|
|
147
|
+
delete options.headers['x-anonymous'];
|
|
160
148
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
.then((res) => {
|
|
164
|
-
if (resolve) {
|
|
165
|
-
resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
149
|
+
if (options.headers['x-resource']) {
|
|
150
|
+
delete options.headers['x-resource'];
|
|
166
151
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
timings.api.push(Number(end - start));
|
|
170
|
-
_resolve((options.responseType === 'stream' || options.fullResponse) ? res : res.data);
|
|
152
|
+
if (accessToken !== '') {
|
|
153
|
+
options.headers.authorization = `Bearer ${accessToken}`;
|
|
171
154
|
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
155
|
+
}
|
|
156
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
157
|
+
if (proxyUrl) {
|
|
158
|
+
options.proxy = this.createProxyConfigFromUrl(proxyUrl);
|
|
159
|
+
}
|
|
160
|
+
const res = await this.req(options);
|
|
161
|
+
const end = process.hrtime.bigint();
|
|
162
|
+
timings.api.push(Number(end - start));
|
|
163
|
+
return options.responseType === 'stream' || options.fullResponse ?
|
|
164
|
+
res :
|
|
165
|
+
res.data;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const end = process.hrtime.bigint();
|
|
169
|
+
timings.api.push(Number(end - start));
|
|
170
|
+
if (error && error.response && (error.response.status === 429 || error.response.status === 503)) {
|
|
171
|
+
let retryAfter = parseInt(error.response.headers['retry-after'] || '10');
|
|
172
|
+
if (isNaN(retryAfter)) {
|
|
173
|
+
retryAfter = 10;
|
|
185
174
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
reject(error);
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
const end = process.hrtime.bigint();
|
|
192
|
-
timings.api.push(Number(end - start));
|
|
193
|
-
_reject(error);
|
|
194
|
-
}
|
|
175
|
+
if (this._debug) {
|
|
176
|
+
await this._logger.log(`Request throttled. Waiting ${retryAfter} sec before retrying...`);
|
|
195
177
|
}
|
|
196
|
-
|
|
197
|
-
|
|
178
|
+
await timersUtil.setTimeout(retryAfter * 1000);
|
|
179
|
+
return this.execute(options);
|
|
180
|
+
}
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
198
183
|
}
|
|
199
184
|
updateRequestForCloudType(options, cloudType) {
|
|
200
185
|
const url = new URL(options.url);
|
package/dist/utils/spo.js
CHANGED
|
@@ -1573,8 +1573,10 @@ export const spo = {
|
|
|
1573
1573
|
AllowSchemaMismatch: true,
|
|
1574
1574
|
BypassSharedLock: !!options?.bypassSharedLock,
|
|
1575
1575
|
IgnoreVersionHistory: !!options?.ignoreVersionHistory,
|
|
1576
|
+
IncludeItemPermissions: !!options?.includeItemPermissions,
|
|
1576
1577
|
CustomizedItemName: options?.newName ? [options.newName] : undefined,
|
|
1577
|
-
SameWebCopyMoveOptimization: true
|
|
1578
|
+
SameWebCopyMoveOptimization: true,
|
|
1579
|
+
IsMoveMode: options?.operation === 'move'
|
|
1578
1580
|
}
|
|
1579
1581
|
}
|
|
1580
1582
|
};
|
|
@@ -1615,7 +1617,7 @@ export const spo = {
|
|
|
1615
1617
|
return objectInfo;
|
|
1616
1618
|
},
|
|
1617
1619
|
/**
|
|
1618
|
-
* Gets the
|
|
1620
|
+
* Gets the primary owner login from a site as admin.
|
|
1619
1621
|
* @param adminUrl The SharePoint admin URL
|
|
1620
1622
|
* @param siteId The site ID
|
|
1621
1623
|
* @param logger The logger object
|
|
@@ -1629,13 +1631,12 @@ export const spo = {
|
|
|
1629
1631
|
const requestOptions = {
|
|
1630
1632
|
url: `${adminUrl}/_api/SPO.Tenant/sites('${siteId}')?$select=OwnerLoginName`,
|
|
1631
1633
|
headers: {
|
|
1632
|
-
accept: 'application/json;odata=nometadata'
|
|
1633
|
-
|
|
1634
|
-
|
|
1634
|
+
accept: 'application/json;odata=nometadata'
|
|
1635
|
+
},
|
|
1636
|
+
responseType: 'json'
|
|
1635
1637
|
};
|
|
1636
1638
|
const response = await request.get(requestOptions);
|
|
1637
|
-
|
|
1638
|
-
return responseContent.OwnerLoginName;
|
|
1639
|
+
return response.OwnerLoginName;
|
|
1639
1640
|
},
|
|
1640
1641
|
/**
|
|
1641
1642
|
* Gets the primary owner login from a site.
|
|
@@ -1650,7 +1651,6 @@ export const spo = {
|
|
|
1650
1651
|
}
|
|
1651
1652
|
const requestOptions = {
|
|
1652
1653
|
url: `${siteUrl}/_api/site/owner`,
|
|
1653
|
-
method: 'GET',
|
|
1654
1654
|
headers: {
|
|
1655
1655
|
'accept': 'application/json;odata=nometadata'
|
|
1656
1656
|
},
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { setTimeout } from "timers/promises";
|
|
2
|
+
export const timersUtil = {
|
|
3
|
+
/**
|
|
4
|
+
* Timeout for a specific duration.
|
|
5
|
+
* @param duration Duration in milliseconds.
|
|
6
|
+
*/
|
|
7
|
+
/* c8 ignore next 3 */
|
|
8
|
+
async setTimeout(duration) {
|
|
9
|
+
return setTimeout(duration);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=timersUtil.js.map
|
package/dist/utils/urlUtil.js
CHANGED
|
@@ -198,6 +198,14 @@ export const urlUtil = {
|
|
|
198
198
|
return rootUrl.origin;
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
|
+
/**
|
|
202
|
+
* Removes leading slashes from the URL.
|
|
203
|
+
* @param url The URL to process.
|
|
204
|
+
* @returns The URL without leading slashes.
|
|
205
|
+
*/
|
|
206
|
+
removeLeadingSlashes(url) {
|
|
207
|
+
return url.replace(/^\/+/, '');
|
|
208
|
+
},
|
|
201
209
|
/**
|
|
202
210
|
* Removes trailing slashes from the URL.
|
|
203
211
|
* @param url The URL to process.
|
|
@@ -22,7 +22,7 @@ This command gets all the necessary diagnostic information needed to triage and
|
|
|
22
22
|
|
|
23
23
|
## Examples
|
|
24
24
|
|
|
25
|
-
Retrieve diagnostic information
|
|
25
|
+
Retrieve diagnostic information.
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
28
|
m365 cli doctor
|
|
@@ -42,18 +42,20 @@ m365 cli doctor
|
|
|
42
42
|
},
|
|
43
43
|
"cliVersion": "6.1.0",
|
|
44
44
|
"nodeVersion": "v16.13.0",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"authMode": "
|
|
45
|
+
"cliEntraAppId": "31359c7f-bd7e-475c-86db-fdb8c937548e",
|
|
46
|
+
"cliEntraAppTenant": "common",
|
|
47
|
+
"authMode": "deviceCode",
|
|
48
48
|
"cliEnvironment": "",
|
|
49
49
|
"cliConfig": {
|
|
50
50
|
"output": "json",
|
|
51
51
|
"showHelpOnFailure": false
|
|
52
52
|
},
|
|
53
53
|
"roles": [],
|
|
54
|
-
"scopes":
|
|
55
|
-
"
|
|
56
|
-
|
|
54
|
+
"scopes": {
|
|
55
|
+
"https://graph.microsoft.com": [
|
|
56
|
+
"AllSites.FullControl"
|
|
57
|
+
]
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
```
|
|
59
61
|
|
|
@@ -61,24 +63,24 @@ m365 cli doctor
|
|
|
61
63
|
<TabItem value="Text">
|
|
62
64
|
|
|
63
65
|
```text
|
|
64
|
-
authMode
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
cliEnvironment
|
|
69
|
-
cliVersion
|
|
70
|
-
nodeVersion
|
|
71
|
-
os
|
|
72
|
-
roles
|
|
73
|
-
scopes
|
|
66
|
+
authMode : deviceCode
|
|
67
|
+
cliConfig : {"output":"json","showHelpOnFailure":false}
|
|
68
|
+
cliEntraAppId : 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
69
|
+
cliEntraAppTenant: common
|
|
70
|
+
cliEnvironment :
|
|
71
|
+
cliVersion : 6.1.0
|
|
72
|
+
nodeVersion : v16.13.0
|
|
73
|
+
os : {"platform":"win32","version":"Windows 10 Pro","release":"10.0.19045"}
|
|
74
|
+
roles : []
|
|
75
|
+
scopes : {"https://graph.microsoft.com":["AllSites.FullControl"]}
|
|
74
76
|
```
|
|
75
77
|
|
|
76
78
|
</TabItem>
|
|
77
79
|
<TabItem value="CSV">
|
|
78
80
|
|
|
79
81
|
```csv
|
|
80
|
-
os,cliVersion,nodeVersion,
|
|
81
|
-
"{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,
|
|
82
|
+
os,cliVersion,nodeVersion,cliEntraAppId,cliEntraAppTenant,authMode,cliEnvironment,cliConfig,roles,scopes
|
|
83
|
+
"{""platform"":""win32"",""version"":""Windows 10 Pro"",""release"":""10.0.19045""}",6.1.0,v16.13.0,31359c7f-bd7e-475c-86db-fdb8c937548e,common,deviceCode,,"{""output"":""json"",""showHelpOnFailure"":false}",[],"{""https://graph.microsoft.com"":[""AllSites.FullControl""]}"
|
|
82
84
|
```
|
|
83
85
|
|
|
84
86
|
</TabItem>
|
|
@@ -93,12 +95,11 @@ m365 cli doctor
|
|
|
93
95
|
---------|-------
|
|
94
96
|
cliVersion | 6.1.0
|
|
95
97
|
nodeVersion | v16.13.0
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
authMode |
|
|
98
|
+
cliEntraAppId | 31359c7f-bd7e-475c-86db-fdb8c937548e
|
|
99
|
+
cliEntraAppTenant | common
|
|
100
|
+
authMode | deviceCode
|
|
99
101
|
cliEnvironment |
|
|
100
102
|
```
|
|
101
103
|
|
|
102
104
|
</TabItem>
|
|
103
105
|
</Tabs>
|
|
104
|
-
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra group member add
|
|
4
|
+
|
|
5
|
+
Adds a member to a Microsoft Entra ID group
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra group member add [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --groupId [groupId]`
|
|
17
|
+
: The ID of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
20
|
+
: The display name of the Microsoft Entra group. Specify `groupId` or `groupDisplayName` but not both.
|
|
21
|
+
|
|
22
|
+
`--ids [ids]`
|
|
23
|
+
: Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
|
|
24
|
+
|
|
25
|
+
`--userNames [userNames]`
|
|
26
|
+
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
|
|
27
|
+
|
|
28
|
+
`-r, --role <role>`
|
|
29
|
+
: The role to be assigned to the new users. Valid values: `Owner`, `Member`.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Global />
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Add a single member specified by ID as a member to a group specified by display name.
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra group member add --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Add multiple members specified by ID as members to a group specified by ID.
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Add a single member specified by UPN as an owner to a group specified by display name.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 entra group member add --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Adds multiple members specified by UPN as owners to a group specified by ID.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 entra group member add --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Response
|
|
61
|
+
|
|
62
|
+
The command won't return a response on success.
|
|
@@ -2,14 +2,14 @@ import Global from '/docs/cmd/_global.mdx';
|
|
|
2
2
|
import Tabs from '@theme/Tabs';
|
|
3
3
|
import TabItem from '@theme/TabItem';
|
|
4
4
|
|
|
5
|
-
# entra group
|
|
5
|
+
# entra group member list
|
|
6
6
|
|
|
7
|
-
Lists
|
|
7
|
+
Lists members of a specific Entra group
|
|
8
8
|
|
|
9
9
|
## Usage
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
m365 entra group
|
|
12
|
+
m365 entra group member list [options]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Alias
|
|
@@ -28,13 +28,13 @@ m365 aad group user list [options]
|
|
|
28
28
|
: The display name of the Entra group. Specify `groupId` or `groupName` but not both.
|
|
29
29
|
|
|
30
30
|
`-r, --role [role]`
|
|
31
|
-
: Filter the results to only
|
|
31
|
+
: Filter the results to only members with the given role: `Owner`, `Member`.
|
|
32
32
|
|
|
33
33
|
`-p, --properties [properties]`
|
|
34
34
|
: Comma-separated list of properties to retrieve.
|
|
35
35
|
|
|
36
36
|
`-f, --filter [filter]`
|
|
37
|
-
: OData filter to use to query the list of
|
|
37
|
+
: OData filter to use to query the list of members with.
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
<Global />
|
|
@@ -45,34 +45,34 @@ When the `properties` option includes values with a `/`, for example: `manager/d
|
|
|
45
45
|
|
|
46
46
|
## Examples
|
|
47
47
|
|
|
48
|
-
List all group
|
|
48
|
+
List all group members from a group specified by ID.
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
|
-
m365 entra group
|
|
51
|
+
m365 entra group member list --groupId 03cba9da-3974-46c1-afaf-79caa2e45bbe
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
List all owners from a group specified by display name.
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
|
-
m365 entra group
|
|
57
|
+
m365 entra group member list --groupName Developers --role Owner
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
List all group
|
|
60
|
+
List all group members from a group specified by name. For each one return the display name, e-mail address, and manager display name.
|
|
61
61
|
|
|
62
62
|
```sh
|
|
63
|
-
m365 entra group
|
|
63
|
+
m365 entra group member list --groupName Developers --properties "displayName,mail,manager/displayName"
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
List all group
|
|
66
|
+
List all group members from a group specified by name. For each one return the display name, e-mail address, and manager information.
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
m365 entra group
|
|
69
|
+
m365 entra group member list --groupName Developers --properties "displayName,mail,manager/*"
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
List all group members that are guest
|
|
72
|
+
List all group members that are guest members.
|
|
73
73
|
|
|
74
74
|
```sh
|
|
75
|
-
m365 entra group
|
|
75
|
+
m365 entra group member list --groupName Developers --filter "userType eq 'Guest'"
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
## Response
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# entra group member set
|
|
4
|
+
|
|
5
|
+
Updates role of members in a Microsoft Entra ID group
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 entra group member set [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --groupId [groupId]`
|
|
17
|
+
: The ID of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --groupDisplayName [groupDisplayName]`
|
|
20
|
+
: The display name of the Entra ID group. Specify `groupId` or `groupDisplayName` but not both.
|
|
21
|
+
|
|
22
|
+
`--ids [ids]`
|
|
23
|
+
: Comma-separated list of user IDs. Specify either `ids` or `userNames` but not both.
|
|
24
|
+
|
|
25
|
+
`--userNames [userNames]`
|
|
26
|
+
: The user principal names of users. You can also pass a comma-separated list of UPNs. Specify either `ids` or `userNames` but not both.
|
|
27
|
+
|
|
28
|
+
`-r, --role <role>`
|
|
29
|
+
: The new role to be assigned to the members. Valid values: `Owner`, `Member`.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
<Global />
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
Update a single member specified by ID to a member of a group specified by display name
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
m365 entra group member set --groupDisplayName Developers --ids 098b9f52-f48c-4401-819f-29c33794c3f5 --role Member
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Update multiple members specified by ID to members of a group specified by ID
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 entra group member set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --ids "098b9f52-f48c-4401-819f-29c33794c3f5,f1e06e31-3abf-4746-83c2-1513d71f38b8" --role Member
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Update a single member specified by UPN to an owner of a group specified by display name
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 entra group member set --groupDisplayName Developers --userNames john.doe@contoso.com --role Owner
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Update multiple members specified by UPN to owners of a group specified by ID
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 entra group member set --groupId a03c0c35-ef9a-419b-8cab-f89e0a8d2d2a --userNames "john.doe@contoso.com,adele.vance@contoso.com" --role Owner
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Response
|
|
61
|
+
|
|
62
|
+
The command won't return a response on success.
|
|
@@ -19,11 +19,14 @@ m365 aad m365group set [options]
|
|
|
19
19
|
## Options
|
|
20
20
|
|
|
21
21
|
```md definition-list
|
|
22
|
-
`-i, --id
|
|
22
|
+
`-i, --id [id]`
|
|
23
23
|
: The ID of the Microsoft 365 Group to update
|
|
24
24
|
|
|
25
25
|
`-n, --displayName [displayName]`
|
|
26
|
-
: Display name
|
|
26
|
+
: Display name of the Microsoft 365 Group to update
|
|
27
|
+
|
|
28
|
+
`--newDisplayName [newDisplayName]`
|
|
29
|
+
: New display name for the Microsoft 365 Group
|
|
27
30
|
|
|
28
31
|
`-d, --description [description]`
|
|
29
32
|
: Description for the Microsoft 365 Group
|
|
@@ -72,7 +75,7 @@ Options `allowExternalSenders` and `autoSubscribeNewMembers` can only be set usi
|
|
|
72
75
|
Update Microsoft 365 Group display name.
|
|
73
76
|
|
|
74
77
|
```sh
|
|
75
|
-
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --
|
|
78
|
+
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --newDisplayName Finance
|
|
76
79
|
```
|
|
77
80
|
|
|
78
81
|
Change Microsoft 365 Group visibility to public.
|
|
@@ -81,16 +84,16 @@ Change Microsoft 365 Group visibility to public.
|
|
|
81
84
|
m365 entra m365group set --id 28beab62-7540-4db1-a23f-29a6018a3848 --isPrivate `false`
|
|
82
85
|
```
|
|
83
86
|
|
|
84
|
-
Add new Microsoft 365 Group owners.
|
|
87
|
+
Add new Microsoft 365 Group owners of group.
|
|
85
88
|
|
|
86
89
|
```sh
|
|
87
|
-
m365 entra m365group set --
|
|
90
|
+
m365 entra m365group set --displayName 'Project Team' --owners "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
88
91
|
```
|
|
89
92
|
|
|
90
93
|
Add new Microsoft 365 Group members.
|
|
91
94
|
|
|
92
95
|
```sh
|
|
93
|
-
m365 entra m365group set --
|
|
96
|
+
m365 entra m365group set --displayName 'Project Team' --members "DebraB@contoso.onmicrosoft.com,DiegoS@contoso.onmicrosoft.com"
|
|
94
97
|
```
|
|
95
98
|
|
|
96
99
|
Update Microsoft 365 Group logo.
|
|
@@ -37,9 +37,6 @@ m365 teams user add
|
|
|
37
37
|
`--teamName [teamName]`
|
|
38
38
|
: The display name of the Microsoft Teams team. Specify only one of the following: `groupId`, `groupName`, `teamId`, or `teamName`.
|
|
39
39
|
|
|
40
|
-
`-n, --userName [userName]`
|
|
41
|
-
: (deprecated) User's UPN (User Principal Name), e.g. johndoe@example.com.
|
|
42
|
-
|
|
43
40
|
`--ids [ids]`
|
|
44
41
|
: Microsoft Entra IDs of users. You can also pass a comma-separated list of IDs. Specify either `ids` or `userNames` but not both.
|
|
45
42
|
|
|
@@ -63,13 +63,13 @@ For more information about using these options, see the Microsoft Graph API docu
|
|
|
63
63
|
Creates an external item with simple properties that everyone is allowed to access
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
66
|
+
m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
Creates an external item with multi-value properties accessible only to users from the specified Entra group
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
72
|
+
m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors@odata.type "Collection(String)" --authors "Phil Harding;#Steve Smith" --acls "grant,group,Super users"
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
## Response
|
|
@@ -123,7 +123,7 @@ m365 external item add --id "pnp-ensure-siteassets-library" --connectionId "samp
|
|
|
123
123
|
<TabItem value="Markdown">
|
|
124
124
|
|
|
125
125
|
```md
|
|
126
|
-
# m365 external item add --id "pnp-ensure-siteassets-library" --
|
|
126
|
+
# m365 external item add --id "pnp-ensure-siteassets-library" --externalConnectionId "samplesolutiongallery" --content "Ensure that the Site Assets library is created." --title "Ensure the Site Assets Library is created" --description "Ensure that the Site Assets library is created." --authors "Phil Harding" --acls "grant,everyone,everyone"
|
|
127
127
|
|
|
128
128
|
Date: 2023-10-28
|
|
129
129
|
|