@pnp/cli-microsoft365 10.7.0 → 10.8.0-beta.26ade35
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 +1 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/Auth.js +82 -22
- package/dist/cli/cli.js +1 -1
- package/dist/m365/adaptivecard/commands/adaptivecard-send.js +54 -67
- package/dist/m365/commands/login.js +1 -1
- package/dist/m365/commands/setup.js +1 -2
- package/dist/m365/entra/commands/organization/organization-list.js +51 -0
- package/dist/m365/entra/commands.js +1 -0
- package/dist/m365/graph/commands/openextension/openextension-set.js +107 -0
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/spe/commands/container/container-permission-list.js +52 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/page/page-section-add.js +20 -23
- package/dist/m365/spo/commands/site/site-set.js +3 -22
- package/dist/m365/teams/commands/app/app-install.js +3 -9
- package/dist/m365/viva/commands/connections/connections-app-create.js +4 -12
- package/dist/utils/entraGroup.js +7 -1
- package/dist/utils/entraUser.js +7 -1
- package/dist/utils/spo.js +1 -1
- package/dist/utils/zod.js +26 -1
- package/docs/docs/cmd/adaptivecard/adaptivecard-send.mdx +1 -1
- package/docs/docs/cmd/entra/organization/organization-list.mdx +154 -0
- package/docs/docs/cmd/graph/openextension/openextension-set.mdx +97 -0
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +90 -0
- package/docs/docs/cmd/spo/field/field-get.mdx +0 -1
- package/npm-shrinkwrap.json +896 -479
- package/package.json +11 -11
|
@@ -4,19 +4,16 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
4
4
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
5
|
};
|
|
6
6
|
var _SpoSiteSetCommand_instances, _SpoSiteSetCommand_initTelemetry, _SpoSiteSetCommand_initOptions, _SpoSiteSetCommand_initValidators, _SpoSiteSetCommand_initTypes;
|
|
7
|
-
import { cli } from '../../../../cli/cli.js';
|
|
8
|
-
import { CommandError } from '../../../../Command.js';
|
|
9
7
|
import config from '../../../../config.js';
|
|
10
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { entraGroup } from '../../../../utils/entraGroup.js';
|
|
11
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
12
11
|
import { spo } from '../../../../utils/spo.js';
|
|
13
12
|
import { urlUtil } from '../../../../utils/urlUtil.js';
|
|
14
13
|
import { validation } from '../../../../utils/validation.js';
|
|
15
|
-
import entraM365GroupSetCommand from '../../../entra/commands/m365group/m365group-set.js';
|
|
16
14
|
import SpoCommand from '../../../base/SpoCommand.js';
|
|
17
15
|
import commands from '../../commands.js';
|
|
18
16
|
import { SharingCapabilities } from '../site/SharingCapabilities.js';
|
|
19
|
-
import spoSiteDesignApplyCommand from '../sitedesign/sitedesign-apply.js';
|
|
20
17
|
import { FlowsPolicy } from './FlowsPolicy.js';
|
|
21
18
|
import { setTimeout } from 'timers/promises';
|
|
22
19
|
class SpoSiteSetCommand extends SpoCommand {
|
|
@@ -55,9 +52,6 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
55
52
|
await this.waitForSiteUpdateCompletion(logger, args, lockState);
|
|
56
53
|
}
|
|
57
54
|
catch (err) {
|
|
58
|
-
if (err instanceof CommandError) {
|
|
59
|
-
err = err.message;
|
|
60
|
-
}
|
|
61
55
|
this.handleRejectedPromise(err);
|
|
62
56
|
}
|
|
63
57
|
}
|
|
@@ -233,13 +227,7 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
233
227
|
promises.push(request.post(requestOptions));
|
|
234
228
|
}
|
|
235
229
|
if (typeof args.options.isPublic !== 'undefined') {
|
|
236
|
-
|
|
237
|
-
id: this.groupId,
|
|
238
|
-
isPrivate: (args.options.isPublic === false),
|
|
239
|
-
debug: this.debug,
|
|
240
|
-
verbose: this.verbose
|
|
241
|
-
};
|
|
242
|
-
promises.push(cli.executeCommand(entraM365GroupSetCommand, { options: { ...commandOptions, _: [] } }));
|
|
230
|
+
promises.push(entraGroup.setGroup(this.groupId, (args.options.isPublic === false), undefined, undefined, logger, this.verbose));
|
|
243
231
|
}
|
|
244
232
|
if (args.options.description) {
|
|
245
233
|
promises.push(this.setGroupifiedSiteDescription(args.options.description));
|
|
@@ -383,14 +371,7 @@ class SpoSiteSetCommand extends SpoCommand {
|
|
|
383
371
|
if (typeof args.options.siteDesignId === 'undefined') {
|
|
384
372
|
return;
|
|
385
373
|
}
|
|
386
|
-
|
|
387
|
-
webUrl: args.options.url,
|
|
388
|
-
id: args.options.siteDesignId,
|
|
389
|
-
asTask: false,
|
|
390
|
-
debug: this.debug,
|
|
391
|
-
verbose: this.verbose
|
|
392
|
-
};
|
|
393
|
-
return cli.executeCommand(spoSiteDesignApplyCommand, { options: { ...options, _: [] } });
|
|
374
|
+
return spo.applySiteDesign(args.options.url, args.options.siteDesignId, logger, this.verbose);
|
|
394
375
|
}
|
|
395
376
|
async loadSiteIds(siteUrl, logger) {
|
|
396
377
|
if (this.debug) {
|
|
@@ -6,9 +6,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
6
6
|
var _TeamsAppInstallCommand_instances, _TeamsAppInstallCommand_initTelemetry, _TeamsAppInstallCommand_initOptions, _TeamsAppInstallCommand_initValidators, _TeamsAppInstallCommand_initOptionSets;
|
|
7
7
|
import { cli } from '../../../../cli/cli.js';
|
|
8
8
|
import request from '../../../../request.js';
|
|
9
|
+
import { entraUser } from '../../../../utils/entraUser.js';
|
|
9
10
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
11
|
import { validation } from '../../../../utils/validation.js';
|
|
11
|
-
import entraUserGetCommand from '../../../entra/commands/user/user-get.js';
|
|
12
12
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
13
13
|
import commands from '../../commands.js';
|
|
14
14
|
class TeamsAppInstallCommand extends GraphCommand {
|
|
@@ -63,16 +63,10 @@ class TeamsAppInstallCommand extends GraphCommand {
|
|
|
63
63
|
if (this.verbose) {
|
|
64
64
|
await logger.logToStderr(`Checking if user ${args.options.userId} exists...`);
|
|
65
65
|
}
|
|
66
|
-
const options = {
|
|
67
|
-
id: args.options.userId,
|
|
68
|
-
output: 'json',
|
|
69
|
-
debug: args.options.debug,
|
|
70
|
-
verbose: args.options.verbose
|
|
71
|
-
};
|
|
72
66
|
try {
|
|
73
|
-
const res = await
|
|
67
|
+
const res = await entraUser.getUpnByUserId(args.options.userId, logger, this.verbose);
|
|
74
68
|
if (this.verbose) {
|
|
75
|
-
await logger.logToStderr(res
|
|
69
|
+
await logger.logToStderr(res);
|
|
76
70
|
}
|
|
77
71
|
return true;
|
|
78
72
|
}
|
|
@@ -8,10 +8,9 @@ import AdmZip from 'adm-zip';
|
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { v4 } from 'uuid';
|
|
11
|
-
import { cli } from '../../../../cli/cli.js';
|
|
12
11
|
import AnonymousCommand from '../../../base/AnonymousCommand.js';
|
|
13
|
-
import spoWebGetCommand from '../../../spo/commands/web/web-get.js';
|
|
14
12
|
import commands from '../../commands.js';
|
|
13
|
+
import { spo } from '../../../../utils/spo.js';
|
|
15
14
|
class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
16
15
|
get name() {
|
|
17
16
|
return commands.CONNECTIONS_APP_CREATE;
|
|
@@ -27,14 +26,13 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
|
27
26
|
}
|
|
28
27
|
async commandAction(logger, args) {
|
|
29
28
|
try {
|
|
30
|
-
const
|
|
29
|
+
const web = await this.getWeb(args, logger);
|
|
31
30
|
if (this.debug) {
|
|
32
|
-
await logger.logToStderr(
|
|
31
|
+
await logger.logToStderr(web);
|
|
33
32
|
}
|
|
34
33
|
if (this.verbose) {
|
|
35
34
|
await logger.logToStderr(`Site found at ${args.options.portalUrl}. Checking if it's a communication site...`);
|
|
36
35
|
}
|
|
37
|
-
const web = JSON.parse(getWebOutput.stdout);
|
|
38
36
|
if (web.WebTemplate !== 'SITEPAGEPUBLISHING' ||
|
|
39
37
|
web.Configuration !== 0) {
|
|
40
38
|
throw `Site ${args.options.portalUrl} is not a Communication Site. Please specify a different site and try again.`;
|
|
@@ -137,13 +135,7 @@ class VivaConnectionsAppCreateCommand extends AnonymousCommand {
|
|
|
137
135
|
if (this.verbose) {
|
|
138
136
|
await logger.logToStderr(`Checking if site ${args.options.url} exists...`);
|
|
139
137
|
}
|
|
140
|
-
|
|
141
|
-
url: args.options.portalUrl,
|
|
142
|
-
output: 'json',
|
|
143
|
-
debug: this.debug,
|
|
144
|
-
verbose: this.verbose
|
|
145
|
-
};
|
|
146
|
-
return cli.executeCommandWithOutput(spoWebGetCommand, { options: { ...options, _: [] } });
|
|
138
|
+
return await spo.getWeb(args.options.portalUrl, logger, this.verbose);
|
|
147
139
|
}
|
|
148
140
|
}
|
|
149
141
|
_VivaConnectionsAppCreateCommand_instances = new WeakSet(), _VivaConnectionsAppCreateCommand_initOptions = function _VivaConnectionsAppCreateCommand_initOptions() {
|
package/dist/utils/entraGroup.js
CHANGED
|
@@ -103,11 +103,17 @@ export const entraGroup = {
|
|
|
103
103
|
}
|
|
104
104
|
return groups[0].id;
|
|
105
105
|
},
|
|
106
|
-
async setGroup(id, isPrivate, logger, verbose) {
|
|
106
|
+
async setGroup(id, isPrivate, displayName, description, logger, verbose) {
|
|
107
107
|
if (verbose && logger) {
|
|
108
108
|
await logger.logToStderr(`Updating Microsoft 365 Group ${id}...`);
|
|
109
109
|
}
|
|
110
110
|
const update = {};
|
|
111
|
+
if (displayName) {
|
|
112
|
+
update.displayName = displayName;
|
|
113
|
+
}
|
|
114
|
+
if (description) {
|
|
115
|
+
update.description = description;
|
|
116
|
+
}
|
|
111
117
|
if (typeof isPrivate !== 'undefined') {
|
|
112
118
|
update.visibility = isPrivate ? 'Private' : 'Public';
|
|
113
119
|
}
|
package/dist/utils/entraUser.js
CHANGED
|
@@ -112,9 +112,15 @@ export const entraUser = {
|
|
|
112
112
|
},
|
|
113
113
|
/**
|
|
114
114
|
* Retrieve the UPN of a user by its ID.
|
|
115
|
+
* Returns the UPN as string
|
|
115
116
|
* @param id User ID.
|
|
117
|
+
* @param logger The logger object
|
|
118
|
+
* @param verbose Set for verbose logging
|
|
116
119
|
*/
|
|
117
|
-
async getUpnByUserId(id) {
|
|
120
|
+
async getUpnByUserId(id, logger, verbose) {
|
|
121
|
+
if (verbose && logger) {
|
|
122
|
+
await logger.logToStderr(`Retrieving the upn for user ${id}`);
|
|
123
|
+
}
|
|
118
124
|
const requestOptions = {
|
|
119
125
|
url: `${graphResource}/v1.0/users/${id}?$select=userPrincipalName`,
|
|
120
126
|
headers: {
|
package/dist/utils/spo.js
CHANGED
|
@@ -1003,7 +1003,7 @@ export const spo = {
|
|
|
1003
1003
|
promises.push(request.post(requestOptions));
|
|
1004
1004
|
}
|
|
1005
1005
|
if (typeof isPublic !== 'undefined') {
|
|
1006
|
-
promises.push(entraGroup.setGroup(groupId, (isPublic === false), logger, verbose));
|
|
1006
|
+
promises.push(entraGroup.setGroup(groupId, (isPublic === false), undefined, undefined, logger, verbose));
|
|
1007
1007
|
}
|
|
1008
1008
|
if (typeof owners !== 'undefined') {
|
|
1009
1009
|
promises.push(spo.setGroupifiedSiteOwners(spoAdminUrl, groupId, owners, logger, verbose));
|
package/dist/utils/zod.js
CHANGED
|
@@ -110,16 +110,41 @@ function parseDef(def, options, currentOption) {
|
|
|
110
110
|
}
|
|
111
111
|
} while (parsedDef);
|
|
112
112
|
}
|
|
113
|
+
function optionToString(optionInfo) {
|
|
114
|
+
let s = '';
|
|
115
|
+
if (optionInfo.short) {
|
|
116
|
+
s += `-${optionInfo.short}, `;
|
|
117
|
+
}
|
|
118
|
+
s += `--${optionInfo.long}`;
|
|
119
|
+
if (optionInfo.type !== 'boolean') {
|
|
120
|
+
s += ' ';
|
|
121
|
+
s += optionInfo.required ? '<' : '[';
|
|
122
|
+
s += optionInfo.long;
|
|
123
|
+
s += optionInfo.required ? '>' : ']';
|
|
124
|
+
}
|
|
125
|
+
return s;
|
|
126
|
+
}
|
|
127
|
+
;
|
|
113
128
|
export const zod = {
|
|
114
129
|
alias(alias, type) {
|
|
115
130
|
type._def.alias = alias;
|
|
116
131
|
return type;
|
|
117
132
|
},
|
|
118
|
-
|
|
133
|
+
schemaToOptionInfo(schema) {
|
|
119
134
|
const options = [];
|
|
120
135
|
parseDef(schema._def, options);
|
|
121
136
|
return options;
|
|
122
137
|
},
|
|
138
|
+
schemaToOptions(schema) {
|
|
139
|
+
const optionsInfo = this.schemaToOptionInfo(schema);
|
|
140
|
+
const options = optionsInfo.map(option => {
|
|
141
|
+
return {
|
|
142
|
+
option: optionToString(option),
|
|
143
|
+
autocomplete: option.autocomplete
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
return options;
|
|
147
|
+
},
|
|
123
148
|
coercedEnum: (e) => z.preprocess(val => {
|
|
124
149
|
const target = String(val)?.toLowerCase();
|
|
125
150
|
for (const k of Object.values(e)) {
|
|
@@ -17,7 +17,7 @@ m365 adaptivecard send [options]
|
|
|
17
17
|
: URL where to send the card to.
|
|
18
18
|
|
|
19
19
|
`-t, --title [title]`
|
|
20
|
-
: Title of the card.
|
|
20
|
+
: Title of the card. If you specify `title` and `card`, the `title` will be merged into the card.
|
|
21
21
|
|
|
22
22
|
`-d, --description [description]`
|
|
23
23
|
: Contents of the card.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# entra organization list
|
|
6
|
+
|
|
7
|
+
Retrieves a list of organizations
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 entra organization list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-p, --properties [properties]`
|
|
19
|
+
: The comma separated list of properties to be returned.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
<Global />
|
|
23
|
+
|
|
24
|
+
## Remarks
|
|
25
|
+
|
|
26
|
+
:::info
|
|
27
|
+
|
|
28
|
+
Applications granted the `User.Read` permission are able to read only the id, displayName, and verifiedDomains properties of the organization.
|
|
29
|
+
All other properties return with null values. To read all properties, use at least `Organization.Read.All`.
|
|
30
|
+
|
|
31
|
+
:::
|
|
32
|
+
|
|
33
|
+
## Examples
|
|
34
|
+
|
|
35
|
+
Retrieve organizations
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 entra organization list
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Retrieve specific info
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
m365 entra organization list --properties 'id,displayName,tenantType'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Response
|
|
48
|
+
|
|
49
|
+
<Tabs>
|
|
50
|
+
<TabItem value="JSON">
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
[
|
|
54
|
+
{
|
|
55
|
+
"id": "e65b162c-6f87-4eb1-a24e-1b37d3504663",
|
|
56
|
+
"deletedDateTime": null,
|
|
57
|
+
"businessPhones": [
|
|
58
|
+
"4258828080"
|
|
59
|
+
],
|
|
60
|
+
"city": null,
|
|
61
|
+
"country": null,
|
|
62
|
+
"countryLetterCode": "IE",
|
|
63
|
+
"createdDateTime": "2023-02-21T19:56:38Z",
|
|
64
|
+
"defaultUsageLocation": null,
|
|
65
|
+
"displayName": "Contoso",
|
|
66
|
+
"isMultipleDataLocationsForServicesEnabled": null,
|
|
67
|
+
"marketingNotificationEmails": [],
|
|
68
|
+
"onPremisesLastSyncDateTime": null,
|
|
69
|
+
"onPremisesSyncEnabled": null,
|
|
70
|
+
"partnerTenantType": null,
|
|
71
|
+
"postalCode": null,
|
|
72
|
+
"preferredLanguage": "en",
|
|
73
|
+
"securityComplianceNotificationMails": [],
|
|
74
|
+
"securityComplianceNotificationPhones": [],
|
|
75
|
+
"state": null,
|
|
76
|
+
"street": null,
|
|
77
|
+
"technicalNotificationMails": [
|
|
78
|
+
"john.doe@contoso.com"
|
|
79
|
+
],
|
|
80
|
+
"tenantType": "AAD",
|
|
81
|
+
"directorySizeQuota": {
|
|
82
|
+
"used": 1400,
|
|
83
|
+
"total": 300000
|
|
84
|
+
},
|
|
85
|
+
"assignedPlans": [],
|
|
86
|
+
"onPremisesSyncStatus": [],
|
|
87
|
+
"privacyProfile": {
|
|
88
|
+
"contactEmail": "john.doe@contoso.com",
|
|
89
|
+
"statementUrl": ""
|
|
90
|
+
},
|
|
91
|
+
"provisionedPlans": [],
|
|
92
|
+
"verifiedDomains": [
|
|
93
|
+
{
|
|
94
|
+
"capabilities": "Email, OfficeCommunicationsOnline",
|
|
95
|
+
"isDefault": true,
|
|
96
|
+
"isInitial": true,
|
|
97
|
+
"name": "contoso.onmicrosoft.com",
|
|
98
|
+
"type": "Managed"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"capabilities": "Email, OfficeCommunicationsOnline, MoeraDomain",
|
|
102
|
+
"isDefault": false,
|
|
103
|
+
"isInitial": false,
|
|
104
|
+
"name": "contoso2.onmicrosoft.com",
|
|
105
|
+
"type": "Managed"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
</TabItem>
|
|
113
|
+
<TabItem value="Text">
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
displayName: Contoso
|
|
117
|
+
id : e65b162c-6f87-4eb1-a24e-1b37d3504663
|
|
118
|
+
tenantType : AAD
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
</TabItem>
|
|
122
|
+
<TabItem value="CSV">
|
|
123
|
+
|
|
124
|
+
```csv
|
|
125
|
+
id,deletedDateTime,city,country,countryLetterCode,createdDateTime,defaultUsageLocation,displayName,isMultipleDataLocationsForServicesEnabled,onPremisesLastSyncDateTime,onPremisesSyncEnabled,partnerTenantType,postalCode,preferredLanguage,state,street,tenantType
|
|
126
|
+
e65b162c-6f87-4eb1-a24e-1b37d3504663,,,,IE,2023-02-21T19:56:38Z,,Contoso,,,,,,en,,,AAD
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
<TabItem value="Markdown">
|
|
131
|
+
|
|
132
|
+
```md
|
|
133
|
+
# entra organization list --debug "false" --verbose "false"
|
|
134
|
+
|
|
135
|
+
Date: 4/18/2025
|
|
136
|
+
|
|
137
|
+
## Contoso (e65b162c-6f87-4eb1-a24e-1b37d3504663)
|
|
138
|
+
|
|
139
|
+
Property | Value
|
|
140
|
+
---------|-------
|
|
141
|
+
id | e65b162c-6f87-4eb1-a24e-1b37d3504663
|
|
142
|
+
countryLetterCode | IE
|
|
143
|
+
createdDateTime | 2023-02-21T19:56:38Z
|
|
144
|
+
displayName | Contoso
|
|
145
|
+
preferredLanguage | en
|
|
146
|
+
tenantType | AAD
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
</TabItem>
|
|
150
|
+
</Tabs>
|
|
151
|
+
|
|
152
|
+
## More information
|
|
153
|
+
|
|
154
|
+
- Organization: https://learn.microsoft.com/graph/api/organization-list
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# graph openextension set
|
|
6
|
+
|
|
7
|
+
Updates an open extension for a resource
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 graph openextension set [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --name <name>`
|
|
19
|
+
: The name of the open extension.
|
|
20
|
+
|
|
21
|
+
`-i, --resourceId <resourceId>`
|
|
22
|
+
: The Id of the resource for which to update the open extension.
|
|
23
|
+
|
|
24
|
+
`-t, --resourceType <resourceType>`
|
|
25
|
+
: The type of resource. Allowed values are `user`, `group`, `device`, `organization`.
|
|
26
|
+
|
|
27
|
+
`-k, --keepUnchangedProperties`
|
|
28
|
+
: Keeps unspecified properties. Without this flag, any property that is not updated will be removed from the extension.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
<Global />
|
|
32
|
+
|
|
33
|
+
## Remarks
|
|
34
|
+
|
|
35
|
+
This command allows using unknown options to update custom data of the open extension.
|
|
36
|
+
|
|
37
|
+
When updating an open extension to a user, it's possible to use the UPN as the resourceId.
|
|
38
|
+
|
|
39
|
+
:::warning[Escaping JSON in PowerShell]
|
|
40
|
+
|
|
41
|
+
When updating open extensions it's possible to enter a JSON string. In PowerShell 5 to 7.2 [specific escaping rules](./../../../user-guide/using-cli.mdx#escaping-double-quotes-in-powershell) apply due to an issue. Remember that you can also use [file tokens](./../../../user-guide/using-cli.mdx#passing-complex-content-into-cli-options) instead.
|
|
42
|
+
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
:::info
|
|
46
|
+
|
|
47
|
+
If a property of the open extension is not specified, the property is removed from the open extension.
|
|
48
|
+
|
|
49
|
+
If a property of the open extension is not specified and `keepUnchangedProperties` is specified, the property will be kept in the open extension.
|
|
50
|
+
|
|
51
|
+
:::
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
Updates an open extension for a user specified by id
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
m365 graph openextension set --userId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user --theme dark --color red --language English
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Updates an open extension for a user specified by UPN
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
m365 graph openextension set --userName john.doe@contoso.com --name 'com.contoso.roamingSettings' --resourceType user --theme dark --color red --language English
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Updates an open extension for a group specified by id, one of the property represents a JSON object
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
m365 graph openextension set --resourceId c956e711-f074-40c3-8431-fbd69bb67d9c --name 'com.contoso.roamingSettings' --resourceType group --settings '{"theme": "dark", "color": "red" }'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Updates an open extension, but keeps the properties that are not specified
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
m365 graph openextension set --userId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user --color red --keepUnchangedProperties
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Updates an open extension, but removes the properties that are not specified
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
m365 graph openextension set --userId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user --color red
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Clears the value of the property
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
m365 graph openextension set --userId eb77fbcf-6fe8-458b-985d-1747284793bc --name 'com.contoso.roamingSettings' --resourceType user --theme ""
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Response
|
|
92
|
+
|
|
93
|
+
The command won't return a response on success.
|
|
94
|
+
|
|
95
|
+
## More information
|
|
96
|
+
|
|
97
|
+
- Open extensions: https://learn.microsoft.com/graph/extensibility-overview?tabs=http#open-extensions
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container permission list
|
|
6
|
+
|
|
7
|
+
Lists permissions of a SharePoint Embedded Container
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container permission list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-i, --containerId <id>`
|
|
19
|
+
: The ID of the SharePoint Embedded Container.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
<Global />
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
Lists Container permissions.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
m365 spe container permission list --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Response
|
|
33
|
+
|
|
34
|
+
<Tabs>
|
|
35
|
+
<TabItem value="JSON">
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
[
|
|
39
|
+
{
|
|
40
|
+
"id": "X2k6MCMuZnxtZW1iZXJzaGlwfGRlYnJhYkBuYWNoYW4zNjUub25taWNyb3NvZnQuY29t",
|
|
41
|
+
"roles": [
|
|
42
|
+
"owner"
|
|
43
|
+
],
|
|
44
|
+
"grantedToV2": {
|
|
45
|
+
"user": {
|
|
46
|
+
"displayName": "John Doe",
|
|
47
|
+
"email": "john.doe@contoso.onmicrosoft.com",
|
|
48
|
+
"userPrincipalName": "john.doe@contoso.onmicrosoft.com"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
</TabItem>
|
|
56
|
+
<TabItem value="Text">
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
id userPrincipalName roles
|
|
60
|
+
-------------------------------------------------------------------- -------------------------------- ------
|
|
61
|
+
X2k6MCMuZnxtZW1iZXJzaGlwfGRlYnJhYkBuYWNoYW4zNjUub25taWNyb3NvZnQuY29t john.doe@contoso.onmicrosoft.com owner
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
</TabItem>
|
|
65
|
+
<TabItem value="CSV">
|
|
66
|
+
|
|
67
|
+
```csv
|
|
68
|
+
id,roles,userPrincipalName
|
|
69
|
+
X2k6MCMuZnxtZW1iZXJzaGlwfGRlYnJhYkBuYWNoYW4zNjUub25taWNyb3NvZnQuY29t,owner,john.doe@contoso.onmicrosoft.com
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
</TabItem>
|
|
73
|
+
<TabItem value="Markdown">
|
|
74
|
+
|
|
75
|
+
```md
|
|
76
|
+
# spe container permission list --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
77
|
+
|
|
78
|
+
Date: 3/3/2025
|
|
79
|
+
|
|
80
|
+
## X2k6MCMuZnxtZW1iZXJzaGlwfGRlYnJhYkBuYWNoYW4zNjUub25taWNyb3NvZnQuY29t
|
|
81
|
+
|
|
82
|
+
Property | Value
|
|
83
|
+
---------|-------
|
|
84
|
+
id | X2k6MCMuZnxtZW1iZXJzaGlwfGRlYnJhYkBuYWNoYW4zNjUub25taWNyb3NvZnQuY29t
|
|
85
|
+
roles | owner
|
|
86
|
+
userPrincipalName | john.doe@contoso.onmicrosoft.com
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</TabItem>
|
|
90
|
+
</Tabs>
|
|
@@ -32,7 +32,6 @@ m365 spo field get [options]
|
|
|
32
32
|
|
|
33
33
|
`-t, --title [title]`
|
|
34
34
|
: The display name (case-sensitive) of the field to retrieve. Specify either `id`, `title` or `internalName`.
|
|
35
|
-
```
|
|
36
35
|
|
|
37
36
|
`--internalName [internalName]`
|
|
38
37
|
: The internal name (case-sensitive) of the field to retrieve. Specify either `id`, `title` or `internalName`.
|