@pnp/cli-microsoft365 7.7.0-beta.a12fb3e → 7.7.0-beta.cec4ca2
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/Command.js +1 -1
- package/dist/cli/cli.js +9 -4
- package/dist/m365/commands/setup.js +1 -7
- package/dist/m365/entra/commands/user/user-list.js +20 -7
- package/dist/m365/spe/commands/containertype/containertype-add.js +115 -0
- package/dist/m365/spe/commands.js +5 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.0.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.1.3.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.10.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.11.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.12.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.13.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.14.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.15.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.16.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.3.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.17.4.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.18.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.19.0-beta.0.js +25 -0
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.2.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.3.4.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.4.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.5.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.6.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.7.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.0.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.8.2.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/doctor-1.9.1.js +3 -1
- package/dist/m365/spfx/commands/project/project-doctor/generic-rules.js +0 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021001_PKG_spfx_deps_versions_match_project_version.js +3 -2
- package/dist/m365/spfx/commands/project/project-doctor/rules/FN021013_PKG_spfx_devdeps_match_version.js +58 -0
- package/dist/m365/spfx/commands/project/project-doctor/spfx-deps.js +2 -0
- package/dist/m365/spfx/commands/project/project-doctor.js +2 -1
- package/dist/m365/spfx/commands/project/project-upgrade/upgrade-1.19.0-beta.0.js +53 -0
- package/dist/m365/spfx/commands/project/project-upgrade.js +16 -13
- package/dist/m365/spfx/commands/spfx-doctor.js +212 -92
- package/dist/m365/spo/commands/listitem/listitem-set.js +9 -156
- package/dist/m365/spo/commands/page/page-add.js +6 -24
- package/dist/m365/spo/commands/page/page-set.js +19 -43
- package/dist/m365/spo/commands/site/site-apppermission-remove.js +8 -9
- package/dist/m365/spo/commands/site/site-hubsite-connect.js +3 -3
- package/dist/m365/spo/commands/site/site-hubsite-disconnect.js +2 -5
- package/dist/utils/prompt.js +2 -0
- package/dist/utils/spo.js +188 -0
- package/docs/docs/cmd/entra/user/user-list.mdx +36 -15
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +140 -0
- package/docs/docs/cmd/spfx/project/project-upgrade.mdx +1 -1
- package/docs/docs/cmd/spfx/spfx-doctor.mdx +108 -2
- package/docs/docs/cmd/spo/page/page-set.mdx +1 -1
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +1 -1
- package/npm-shrinkwrap.json +138 -214
- package/package.json +14 -14
package/dist/utils/spo.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os from 'os';
|
|
1
2
|
import url from 'url';
|
|
2
3
|
import { urlUtil } from "./urlUtil.js";
|
|
3
4
|
import { validation } from "./validation.js";
|
|
@@ -1231,6 +1232,113 @@ export const spo = {
|
|
|
1231
1232
|
};
|
|
1232
1233
|
await request.post(requestOptions);
|
|
1233
1234
|
},
|
|
1235
|
+
/**
|
|
1236
|
+
* Gets a file as list item by url
|
|
1237
|
+
* @param absoluteListUrl The absolute url to the list
|
|
1238
|
+
* @param url The url of the file
|
|
1239
|
+
* @param logger The logger object
|
|
1240
|
+
* @param verbose If in verbose mode
|
|
1241
|
+
* @returns The list item object
|
|
1242
|
+
*/
|
|
1243
|
+
async getFileAsListItemByUrl(absoluteListUrl, url, logger, verbose) {
|
|
1244
|
+
if (verbose && logger) {
|
|
1245
|
+
logger.logToStderr(`Getting the file properties with url ${url}`);
|
|
1246
|
+
}
|
|
1247
|
+
const serverRelativePath = urlUtil.getServerRelativePath(absoluteListUrl, url);
|
|
1248
|
+
const requestUrl = `${absoluteListUrl}/_api/web/GetFileByServerRelativePath(DecodedUrl=@f)?$expand=ListItemAllFields&@f='${formatting.encodeQueryParameter(serverRelativePath)}'`;
|
|
1249
|
+
const requestOptions = {
|
|
1250
|
+
url: requestUrl,
|
|
1251
|
+
headers: {
|
|
1252
|
+
'accept': 'application/json;odata=nometadata'
|
|
1253
|
+
},
|
|
1254
|
+
responseType: 'json'
|
|
1255
|
+
};
|
|
1256
|
+
const file = await request.get(requestOptions);
|
|
1257
|
+
return file.ListItemAllFields;
|
|
1258
|
+
},
|
|
1259
|
+
/**
|
|
1260
|
+
* Updates a list item with system update
|
|
1261
|
+
* @param absoluteListUrl The absolute base URL without query parameters, pointing to the specific list where the item resides. This URL should represent the list.
|
|
1262
|
+
* @param itemId The id of the list item
|
|
1263
|
+
* @param properties An object of the properties that should be updated
|
|
1264
|
+
* @param contentTypeName The name of the content type to update
|
|
1265
|
+
* @param logger The logger object
|
|
1266
|
+
* @param verbose If in verbose mode
|
|
1267
|
+
* @returns The updated list item object
|
|
1268
|
+
*/
|
|
1269
|
+
async systemUpdateListItem(absoluteListUrl, itemId, logger, verbose, properties, contentTypeName) {
|
|
1270
|
+
if (!properties && !contentTypeName) {
|
|
1271
|
+
// Neither properties nor contentTypeName provided, no need to proceed
|
|
1272
|
+
throw 'Either properties or contentTypeName must be provided for systemUpdateListItem.';
|
|
1273
|
+
}
|
|
1274
|
+
const parsedUrl = new URL(absoluteListUrl);
|
|
1275
|
+
const serverRelativeSiteMatch = absoluteListUrl.match(new RegExp('/sites/[^/]+'));
|
|
1276
|
+
const webUrl = `${parsedUrl.protocol}//${parsedUrl.host}${serverRelativeSiteMatch ?? ''}`;
|
|
1277
|
+
if (verbose && logger) {
|
|
1278
|
+
logger.logToStderr(`Getting list id...`);
|
|
1279
|
+
}
|
|
1280
|
+
const listRequestOptions = {
|
|
1281
|
+
url: `${absoluteListUrl}?$select=Id`,
|
|
1282
|
+
headers: {
|
|
1283
|
+
'accept': 'application/json;odata=nometadata'
|
|
1284
|
+
},
|
|
1285
|
+
responseType: 'json'
|
|
1286
|
+
};
|
|
1287
|
+
const list = await request.get(listRequestOptions);
|
|
1288
|
+
const listId = list.Id;
|
|
1289
|
+
if (verbose && logger) {
|
|
1290
|
+
logger.logToStderr(`Getting request digest for systemUpdate request`);
|
|
1291
|
+
}
|
|
1292
|
+
const res = await spo.getRequestDigest(webUrl);
|
|
1293
|
+
const formDigestValue = res.FormDigestValue;
|
|
1294
|
+
const objectIdentity = await spo.requestObjectIdentity(webUrl, logger, verbose);
|
|
1295
|
+
let index = 0;
|
|
1296
|
+
const requestBodyOptions = properties ? Object.keys(properties).map(key => `
|
|
1297
|
+
<Method Name="ParseAndSetFieldValue" Id="${++index}" ObjectPathId="147">
|
|
1298
|
+
<Parameters>
|
|
1299
|
+
<Parameter Type="String">${key}</Parameter>
|
|
1300
|
+
<Parameter Type="String">${properties[key].toString()}</Parameter>
|
|
1301
|
+
</Parameters>
|
|
1302
|
+
</Method>`) : [];
|
|
1303
|
+
const additionalContentType = contentTypeName ? `
|
|
1304
|
+
<Method Name="ParseAndSetFieldValue" Id="${++index}" ObjectPathId="147">
|
|
1305
|
+
<Parameters>
|
|
1306
|
+
<Parameter Type="String">ContentType</Parameter>
|
|
1307
|
+
<Parameter Type="String">${contentTypeName}</Parameter>
|
|
1308
|
+
</Parameters>
|
|
1309
|
+
</Method>` : '';
|
|
1310
|
+
const requestBody = `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009">
|
|
1311
|
+
<Actions>
|
|
1312
|
+
${requestBodyOptions.join('')}${additionalContentType}
|
|
1313
|
+
<Method Name="SystemUpdate" Id="${++index}" ObjectPathId="147" />
|
|
1314
|
+
</Actions>
|
|
1315
|
+
<ObjectPaths>
|
|
1316
|
+
<Identity Id="147" Name="${objectIdentity}:list:${listId}:item:${itemId},1" />
|
|
1317
|
+
</ObjectPaths>
|
|
1318
|
+
</Request>`;
|
|
1319
|
+
const requestOptions = {
|
|
1320
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
1321
|
+
headers: {
|
|
1322
|
+
'Content-Type': 'text/xml',
|
|
1323
|
+
'X-RequestDigest': formDigestValue
|
|
1324
|
+
},
|
|
1325
|
+
data: requestBody
|
|
1326
|
+
};
|
|
1327
|
+
const response = await request.post(requestOptions);
|
|
1328
|
+
if (response.indexOf("ErrorMessage") > -1) {
|
|
1329
|
+
throw `Error occurred in systemUpdate operation - ${response}`;
|
|
1330
|
+
}
|
|
1331
|
+
const id = Number(itemId);
|
|
1332
|
+
const requestOptionsItems = {
|
|
1333
|
+
url: `${absoluteListUrl}/items(${id})`,
|
|
1334
|
+
headers: {
|
|
1335
|
+
'accept': 'application/json;odata=nometadata'
|
|
1336
|
+
},
|
|
1337
|
+
responseType: 'json'
|
|
1338
|
+
};
|
|
1339
|
+
const itemsResponse = await request.get(requestOptionsItems);
|
|
1340
|
+
return (itemsResponse);
|
|
1341
|
+
},
|
|
1234
1342
|
/**
|
|
1235
1343
|
* Removes the retention label from the items in the given list.
|
|
1236
1344
|
* @param webUrl The url of the web
|
|
@@ -1334,6 +1442,86 @@ export const spo = {
|
|
|
1334
1442
|
};
|
|
1335
1443
|
const site = await request.get(requestOptions);
|
|
1336
1444
|
return site.id;
|
|
1445
|
+
},
|
|
1446
|
+
/**
|
|
1447
|
+
* Retrieves the ObjectIdentity from a SharePoint site
|
|
1448
|
+
* @param webUrl web url
|
|
1449
|
+
* @param logger The logger object
|
|
1450
|
+
* @param verbose If in verbose mode
|
|
1451
|
+
* @return The ObjectIdentity as string
|
|
1452
|
+
*/
|
|
1453
|
+
async requestObjectIdentity(webUrl, logger, verbose) {
|
|
1454
|
+
const res = await spo.getRequestDigest(webUrl);
|
|
1455
|
+
const formDigestValue = res.FormDigestValue;
|
|
1456
|
+
const requestOptions = {
|
|
1457
|
+
url: `${webUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
1458
|
+
headers: {
|
|
1459
|
+
'X-RequestDigest': formDigestValue
|
|
1460
|
+
},
|
|
1461
|
+
data: `<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="${config.applicationName}" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009"><Actions><Query Id="1" ObjectPathId="5"><Query SelectAllProperties="false"><Properties><Property Name="ServerRelativeUrl" ScalarProperty="true" /></Properties></Query></Query></Actions><ObjectPaths><Property Id="5" ParentId="3" Name="Web" /><StaticProperty Id="3" TypeId="{3747adcd-a3c3-41b9-bfab-4a64dd2f1e0a}" Name="Current" /></ObjectPaths></Request>`
|
|
1462
|
+
};
|
|
1463
|
+
const response = await request.post(requestOptions);
|
|
1464
|
+
if (verbose) {
|
|
1465
|
+
logger.logToStderr('Attempt to get _ObjectIdentity_ key values');
|
|
1466
|
+
}
|
|
1467
|
+
const json = JSON.parse(response);
|
|
1468
|
+
const contents = json.find(x => { return x.ErrorInfo; });
|
|
1469
|
+
if (contents && contents.ErrorInfo) {
|
|
1470
|
+
throw contents.ErrorInfo.ErrorMessage || 'ClientSvc unknown error';
|
|
1471
|
+
}
|
|
1472
|
+
const identityObject = json.find(x => { return x._ObjectIdentity_; });
|
|
1473
|
+
if (identityObject) {
|
|
1474
|
+
return identityObject._ObjectIdentity_;
|
|
1475
|
+
}
|
|
1476
|
+
throw 'Cannot proceed. _ObjectIdentity_ not found'; // this is not supposed to happen
|
|
1477
|
+
},
|
|
1478
|
+
/**
|
|
1479
|
+
* Updates a list item without system update
|
|
1480
|
+
* @param absoluteListUrl The absolute base URL without query parameters, pointing to the specific list where the item resides. This URL should represent the list.
|
|
1481
|
+
* @param itemId The id of the list item
|
|
1482
|
+
* @param properties An object of the properties that should be updated
|
|
1483
|
+
* @param contentTypeName The name of the content type to update
|
|
1484
|
+
* @returns The updated listitem object
|
|
1485
|
+
*/
|
|
1486
|
+
async updateListItem(absoluteListUrl, itemId, properties, contentTypeName) {
|
|
1487
|
+
const requestBodyOptions = [
|
|
1488
|
+
...(properties
|
|
1489
|
+
? Object.keys(properties).map((key) => ({
|
|
1490
|
+
FieldName: key,
|
|
1491
|
+
FieldValue: properties[key].toString()
|
|
1492
|
+
}))
|
|
1493
|
+
: [])
|
|
1494
|
+
];
|
|
1495
|
+
const requestBody = {
|
|
1496
|
+
formValues: requestBodyOptions
|
|
1497
|
+
};
|
|
1498
|
+
contentTypeName && requestBody.formValues.push({
|
|
1499
|
+
FieldName: 'ContentType',
|
|
1500
|
+
FieldValue: contentTypeName
|
|
1501
|
+
});
|
|
1502
|
+
const requestOptions = {
|
|
1503
|
+
url: `${absoluteListUrl}/items(${itemId})/ValidateUpdateListItem()`,
|
|
1504
|
+
headers: {
|
|
1505
|
+
'accept': 'application/json;odata=nometadata'
|
|
1506
|
+
},
|
|
1507
|
+
data: requestBody,
|
|
1508
|
+
responseType: 'json'
|
|
1509
|
+
};
|
|
1510
|
+
const response = await request.post(requestOptions);
|
|
1511
|
+
// Response is from /ValidateUpdateListItem POST call, perform get on updated item to get all field values
|
|
1512
|
+
const fieldValues = response.value;
|
|
1513
|
+
if (fieldValues.some(f => f.HasException)) {
|
|
1514
|
+
throw `Updating the items has failed with the following errors: ${os.EOL}${fieldValues.filter(f => f.HasException).map(f => { return `- ${f.FieldName} - ${f.ErrorMessage}`; }).join(os.EOL)}`;
|
|
1515
|
+
}
|
|
1516
|
+
const requestOptionsItems = {
|
|
1517
|
+
url: `${absoluteListUrl}/items(${itemId})`,
|
|
1518
|
+
headers: {
|
|
1519
|
+
'accept': 'application/json;odata=nometadata'
|
|
1520
|
+
},
|
|
1521
|
+
responseType: 'json'
|
|
1522
|
+
};
|
|
1523
|
+
const itemsResponse = await request.get(requestOptionsItems);
|
|
1524
|
+
return (itemsResponse);
|
|
1337
1525
|
}
|
|
1338
1526
|
};
|
|
1339
1527
|
//# sourceMappingURL=spo.js.map
|
|
@@ -21,6 +21,9 @@ m365 aad user list [options]
|
|
|
21
21
|
## Options
|
|
22
22
|
|
|
23
23
|
```md definition-list
|
|
24
|
+
`--type [type]`
|
|
25
|
+
: Filter the results to only users of a given type: `Member` or `Guest`. By default, all users are listed.
|
|
26
|
+
|
|
24
27
|
`-p, --properties [properties]`
|
|
25
28
|
: Comma-separated list of properties to retrieve
|
|
26
29
|
```
|
|
@@ -29,7 +32,9 @@ m365 aad user list [options]
|
|
|
29
32
|
|
|
30
33
|
## Remarks
|
|
31
34
|
|
|
32
|
-
Using the `--properties` option, you can specify a comma-separated list of user properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will retrieve user's display name
|
|
35
|
+
Using the `--properties` option, you can specify a comma-separated list of user properties to retrieve from the Microsoft Graph. If you don't specify any properties, the command will retrieve user's display name, account name, id, and mail.
|
|
36
|
+
|
|
37
|
+
When the `properties` option includes values with a `/`, for example: `manager/displayName`, an additional `$expand` query parameter will be included on `manager`.
|
|
33
38
|
|
|
34
39
|
To filter the list of users, include additional options that match the user property that you want to filter with. For example `--displayName Patt` will return all users whose `displayName` starts with `Patt`. Multiple filters will be combined using the `and` operator.
|
|
35
40
|
|
|
@@ -37,30 +42,42 @@ Certain properties cannot be returned within a user collection. The following pr
|
|
|
37
42
|
|
|
38
43
|
## Examples
|
|
39
44
|
|
|
40
|
-
List all users in the tenant
|
|
45
|
+
List all users in the tenant.
|
|
41
46
|
|
|
42
47
|
```sh
|
|
43
48
|
m365 entra user list
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
List all users in the tenant.
|
|
51
|
+
List all guest users in the tenant.
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
m365 entra user list --type Guest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
List all users in the tenant. For each one return the display name and e-mail address.
|
|
47
58
|
|
|
48
59
|
```sh
|
|
49
60
|
m365 entra user list --properties "displayName,mail"
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
Show users whose display name starts with _Patt_
|
|
63
|
+
Show users whose display name starts with _Patt_.
|
|
53
64
|
|
|
54
65
|
```sh
|
|
55
66
|
m365 entra user list --displayName Patt
|
|
56
67
|
```
|
|
57
68
|
|
|
58
|
-
Show all account managers whose display name starts with _Patt_
|
|
69
|
+
Show all account managers whose display name starts with _Patt_.
|
|
59
70
|
|
|
60
71
|
```sh
|
|
61
72
|
m365 entra user list --displayName Patt --jobTitle 'Account manager'
|
|
62
73
|
```
|
|
63
74
|
|
|
75
|
+
List users from the tenant. For each one return the display name, e-mail address, and manager information.
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
m365 entra user list --properties "displayName,mail,manager/*"
|
|
79
|
+
```
|
|
80
|
+
|
|
64
81
|
## Response
|
|
65
82
|
|
|
66
83
|
<Tabs>
|
|
@@ -69,8 +86,10 @@ m365 entra user list --displayName Patt --jobTitle 'Account manager'
|
|
|
69
86
|
```json
|
|
70
87
|
[
|
|
71
88
|
{
|
|
72
|
-
"
|
|
73
|
-
"displayName": "John Doe"
|
|
89
|
+
"id": "1f5595b2-aa07-445d-9801-a45ea18160b2",
|
|
90
|
+
"displayName": "John Doe",
|
|
91
|
+
"mail": "John@contoso.onmicrosoft.com",
|
|
92
|
+
"userPrincipalName": "John@contoso.onmicrosoft.com"
|
|
74
93
|
}
|
|
75
94
|
]
|
|
76
95
|
```
|
|
@@ -79,17 +98,17 @@ m365 entra user list --displayName Patt --jobTitle 'Account manager'
|
|
|
79
98
|
<TabItem value="Text">
|
|
80
99
|
|
|
81
100
|
```text
|
|
82
|
-
userPrincipalName
|
|
83
|
-
|
|
84
|
-
John@contoso.onmicrosoft.com
|
|
101
|
+
id displayName mail userPrincipalName
|
|
102
|
+
------------------------------------ ------------------ ----------------------------------- ------------------------------------------
|
|
103
|
+
1f5595b2-aa07-445d-9801-a45ea18160b2 John Doe John@contoso.onmicrosoft.com John@contoso.onmicrosoft.com
|
|
85
104
|
```
|
|
86
105
|
|
|
87
106
|
</TabItem>
|
|
88
107
|
<TabItem value="CSV">
|
|
89
108
|
|
|
90
109
|
```csv
|
|
91
|
-
|
|
92
|
-
John@contoso.onmicrosoft.com,John
|
|
110
|
+
id,displayName,mail,userPrincipalName
|
|
111
|
+
1f5595b2-aa07-445d-9801-a45ea18160b2,John Doe,John@contoso.onmicrosoft.com,John@contoso.onmicrosoft.com
|
|
93
112
|
```
|
|
94
113
|
|
|
95
114
|
</TabItem>
|
|
@@ -100,12 +119,14 @@ m365 entra user list --displayName Patt --jobTitle 'Account manager'
|
|
|
100
119
|
|
|
101
120
|
Date: 2023-06-02
|
|
102
121
|
|
|
103
|
-
## John Doe
|
|
122
|
+
## John Doe (1f5595b2-aa07-445d-9801-a45ea18160b2)
|
|
104
123
|
|
|
105
124
|
Property | Value
|
|
106
125
|
---------|-------
|
|
107
|
-
|
|
126
|
+
id | 1f5595b2-aa07-445d-9801-a45ea18160b2
|
|
108
127
|
displayName | John Doe
|
|
128
|
+
mail | John@contoso.onmicrosoft.com
|
|
129
|
+
userPrincipalName | John@contoso.onmicrosoft.com
|
|
109
130
|
```
|
|
110
131
|
|
|
111
132
|
</TabItem>
|
|
@@ -113,4 +134,4 @@ m365 entra user list --displayName Patt --jobTitle 'Account manager'
|
|
|
113
134
|
|
|
114
135
|
## More information
|
|
115
136
|
|
|
116
|
-
- Microsoft Graph User properties: [https://
|
|
137
|
+
- Microsoft Graph User properties: [https://learn.microsoft.com/graph/api/resources/user?view=graph-rest-1.0#properties](https://learn.microsoft.com/graph/api/resources/user?view=graph-rest-1.0#properties)
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe containertype add
|
|
6
|
+
|
|
7
|
+
Creates a new Container Type for your app
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe containertype add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --name <name>`
|
|
19
|
+
: Container type name.
|
|
20
|
+
|
|
21
|
+
`--applicationId <applicationId>`
|
|
22
|
+
: Application ID of the Microsoft Entra ID app that will be the owner of the Container Type.
|
|
23
|
+
|
|
24
|
+
`--trial`
|
|
25
|
+
: Specify if the Container Type should be a trial.
|
|
26
|
+
|
|
27
|
+
`--azureSubscriptionId [azureSubscriptionId]`
|
|
28
|
+
: Azure Subscription Id. Required unless the `trail` option was specified.
|
|
29
|
+
|
|
30
|
+
`--resourceGroup [resourceGroup]`
|
|
31
|
+
: Azure Resource group for billing. Required unless the `trail` option was specified.
|
|
32
|
+
|
|
33
|
+
`--region [region]`
|
|
34
|
+
: Region. Required unless the `trail` option was specified.
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
<Global />
|
|
38
|
+
|
|
39
|
+
## Remarks
|
|
40
|
+
|
|
41
|
+
:::note
|
|
42
|
+
You can only create one Trial Container per tenant, a single application registration can only contain one Container and a tenant can contain a maximum of five Containers in total.
|
|
43
|
+
:::
|
|
44
|
+
|
|
45
|
+
## Examples
|
|
46
|
+
|
|
47
|
+
Adds a new trial Container Type
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
m365 spe containertype add --name 'trial container' --applicationId '1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac' --trial
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Adds a new Container Type using a standard Container Type.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
m365 spe containertype add --name 'standard container' --applicationId '1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac' --azureSubscriptionId 'f08575e2-36c4-407f-a891-eabae23f66bc' --region 'West Europe' --resourceGroup 'Standard group'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Response
|
|
60
|
+
|
|
61
|
+
<Tabs>
|
|
62
|
+
<TabItem value="JSON">
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"AzureSubscriptionId": "f08575e2-36c4-407f-a891-eabae23f66bc",
|
|
67
|
+
"ContainerTypeId": "c33cfee5-c9b6-0a2a-02ee-060693a57f37",
|
|
68
|
+
"CreationDate": "3/11/2024 2:38:56 PM",
|
|
69
|
+
"DisplayName": "standard container",
|
|
70
|
+
"ExpiryDate": null,
|
|
71
|
+
"IsBillingProfileRequired": true,
|
|
72
|
+
"OwningAppId": "1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac",
|
|
73
|
+
"OwningTenantId": "e1dd4023-a656-480a-8a0e-c1b1eec51e1d",
|
|
74
|
+
"Region": "West Europe",
|
|
75
|
+
"ResourceGroup": "Standard group",
|
|
76
|
+
"SPContainerTypeBillingClassification": "Standard"
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
</TabItem>
|
|
81
|
+
<TabItem value="Text">
|
|
82
|
+
|
|
83
|
+
```text
|
|
84
|
+
AzureSubscriptionId : f08575e2-36c4-407f-a891-eabae23f66bc
|
|
85
|
+
ContainerTypeId : 331f3b15-b4f6-05e0-05de-2d8c370462b3
|
|
86
|
+
CreationDate : 3/11/2024 2:47:16 PM
|
|
87
|
+
DisplayName : Standard container
|
|
88
|
+
ExpiryDate : null
|
|
89
|
+
IsBillingProfileRequired : false
|
|
90
|
+
OwningAppId : 1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac
|
|
91
|
+
OwningTenantId : e1dd4023-a656-480a-8a0e-c1b1eec51e1d
|
|
92
|
+
Region : West Europe
|
|
93
|
+
ResourceGroup : Standard group
|
|
94
|
+
SPContainerTypeBillingClassification: Standard
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
</TabItem>
|
|
98
|
+
<TabItem value="CSV">
|
|
99
|
+
|
|
100
|
+
```csv
|
|
101
|
+
AzureSubscriptionId,ContainerTypeId,CreationDate,DisplayName,ExpiryDate,IsBillingProfileRequired,OwningAppId,OwningTenantId,Region,ResourceGroup,SPContainerTypeBillingClassification
|
|
102
|
+
f08575e2-36c4-407f-a891-eabae23f66bc,331f3b15-b4f6-05e0-05de-2d8c370462b3,3/11/2024 2:48:13 PM,Standard container,,,1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac,e1dd4023-a656-480a-8a0e-c1b1eec51e1d,West Europe,Standard group,Standard
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</TabItem>
|
|
106
|
+
<TabItem value="Markdown">
|
|
107
|
+
|
|
108
|
+
```md
|
|
109
|
+
# spe containertype add --name 'Standard container' --applicationId '1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac' --azureSubscriptionId 'f08575e2-36c4-407f-a891-eabae23f66bc' --region 'West Europe' --resourceGroup 'Standard group'
|
|
110
|
+
|
|
111
|
+
Date: 11/03/2024
|
|
112
|
+
|
|
113
|
+
## Standard container
|
|
114
|
+
|
|
115
|
+
Property | Value
|
|
116
|
+
---------|-------
|
|
117
|
+
AzureSubscriptionId | f08575e2-36c4-407f-a891-eabae23f66bc
|
|
118
|
+
ContainerTypeId | 331f3b15-b4f6-05e0-05de-2d8c370462b3
|
|
119
|
+
CreationDate | 3/11/2024 2:49:16 PM
|
|
120
|
+
DisplayName | Standard Container
|
|
121
|
+
IsBillingProfileRequired | false
|
|
122
|
+
OwningAppId | 1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac
|
|
123
|
+
OwningTenantId | e1dd4023-a656-480a-8a0e-c1b1eec51e1d
|
|
124
|
+
Region | West Europe
|
|
125
|
+
ResourceGroup | Standard group
|
|
126
|
+
SPContainerTypeBillingClassification | Standard
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</TabItem>
|
|
130
|
+
</Tabs>
|
|
131
|
+
|
|
132
|
+
## More information
|
|
133
|
+
|
|
134
|
+
In SharePoint Embedded, all files and documents are stored in Containers, and each Container is identified by a Container Type.
|
|
135
|
+
|
|
136
|
+
Container Type is a property stamped on every Container instance. Each Container Type is owned by one Application, and each Application can own only one Container Type.
|
|
137
|
+
|
|
138
|
+
The primary function of a Container Type is to manage the application workload that can access the Containers. Container Type defines the access permissions an Application has towards all Containers of that type, including create, read, write, delete containers; manage container permissions, etc.
|
|
139
|
+
|
|
140
|
+
More information about SharePoint Embedded and the limits can be found at the following location: [SharePoint Embedded](https://learn.microsoft.com/en-us/sharepoint/dev/embedded/concepts/app-concepts/containertypes#sharepoint-embedded-trial-container-types)
|
|
@@ -35,7 +35,7 @@ m365 spfx project upgrade [options]
|
|
|
35
35
|
|
|
36
36
|
## Remarks
|
|
37
37
|
|
|
38
|
-
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.
|
|
38
|
+
The `spfx project upgrade` command helps you upgrade your SharePoint Framework project to the specified version. If no version is specified, the command will upgrade to the latest version of the SharePoint Framework it supports (v1.19.0-beta.0).
|
|
39
39
|
|
|
40
40
|
This command doesn't change your project files. Instead, it gives you a report with all steps necessary to upgrade your project to the specified version of the SharePoint Framework. Changing project files is error-prone, especially when it comes to updating your solution's code. This is why at this moment, this command produces a report that you can use yourself to perform the necessary updates and verify that everything is working as expected.
|
|
41
41
|
|
|
@@ -27,7 +27,7 @@ m365 spfx doctor [options]
|
|
|
27
27
|
: JMESPath query string. See [http://jmespath.org/](http://jmespath.org/) for more information and examples
|
|
28
28
|
|
|
29
29
|
`-o, --output [output]`
|
|
30
|
-
: Output type. `text`. Default `text`
|
|
30
|
+
: Output type. `text` or `json`. Default `text`
|
|
31
31
|
|
|
32
32
|
`--verbose`
|
|
33
33
|
: Runs command with verbose logging
|
|
@@ -56,7 +56,7 @@ Checks ran by this command are based on what is officially supported by Microsof
|
|
|
56
56
|
|
|
57
57
|
:::info
|
|
58
58
|
|
|
59
|
-
This command supports only text output.
|
|
59
|
+
This command supports only text or json output.
|
|
60
60
|
|
|
61
61
|
:::
|
|
62
62
|
|
|
@@ -80,11 +80,67 @@ Verify if your environment meets the requirements to work with SharePoint Framew
|
|
|
80
80
|
m365 spfx doctor --spfxVersion 1.11.0 --output text
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
+
Verify if your environment meets the requirements to work with SharePoint Framework v1.11.0 and outputs it in a JSON format.
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
m365 spfx doctor --spfxVersion 1.11.0 --output json
|
|
87
|
+
```
|
|
88
|
+
|
|
83
89
|
## Response
|
|
84
90
|
|
|
85
91
|
### Response with no issues
|
|
86
92
|
|
|
87
93
|
<Tabs>
|
|
94
|
+
<TabItem value="JSON">
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
[
|
|
98
|
+
{
|
|
99
|
+
"check": "SharePoint Framework",
|
|
100
|
+
"passed": true,
|
|
101
|
+
"version": "1.18.2",
|
|
102
|
+
"message": "SharePoint Framework v1.18.2 valid."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"check": "SharePoint Framework",
|
|
106
|
+
"passed": true,
|
|
107
|
+
"version": "1.18.2",
|
|
108
|
+
"message": "SharePoint Framework v1.18.2"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"check": "env",
|
|
112
|
+
"passed": true,
|
|
113
|
+
"message": "Supported in SPO",
|
|
114
|
+
"version": "spo"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"check": "Node",
|
|
118
|
+
"passed": true,
|
|
119
|
+
"message": "Node v18.18.2",
|
|
120
|
+
"version": "18.18.2"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"check": "yo",
|
|
124
|
+
"passed": true,
|
|
125
|
+
"message": "yo v5.0.0",
|
|
126
|
+
"version": "5.0.0"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"check": "gulp-cli",
|
|
130
|
+
"passed": true,
|
|
131
|
+
"message": "gulp-cli v2.3.0",
|
|
132
|
+
"version": "2.3.0"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"check": "typescript",
|
|
136
|
+
"passed": true,
|
|
137
|
+
"message": "bundled typescript used"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
</TabItem>
|
|
143
|
+
|
|
88
144
|
<TabItem value="Text">
|
|
89
145
|
|
|
90
146
|
```text
|
|
@@ -106,6 +162,56 @@ m365 spfx doctor --spfxVersion 1.11.0 --output text
|
|
|
106
162
|
When the installed version of Yeoman is lower than expected to run SharePoint Framework v1.15.0
|
|
107
163
|
|
|
108
164
|
<Tabs>
|
|
165
|
+
<TabItem value="JSON">
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
[
|
|
169
|
+
{
|
|
170
|
+
"check": "SharePoint Framework",
|
|
171
|
+
"passed": true,
|
|
172
|
+
"version": "1.15.0",
|
|
173
|
+
"message": "SharePoint Framework v1.15.0 valid."
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"check": "SharePoint Framework",
|
|
177
|
+
"passed": true,
|
|
178
|
+
"version": "1.15.0",
|
|
179
|
+
"message": "SharePoint Framework v1.15.0"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"check": "env",
|
|
183
|
+
"passed": true,
|
|
184
|
+
"message": "Supported in SPO",
|
|
185
|
+
"version": "spo"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"check": "Node",
|
|
189
|
+
"passed": true,
|
|
190
|
+
"message": "Node v16.18.0",
|
|
191
|
+
"version": "16.18.0"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"check": "yo",
|
|
195
|
+
"passed": false,
|
|
196
|
+
"message": "yo v3.1.1 found, v^4 required",
|
|
197
|
+
"version": "3.1.1",
|
|
198
|
+
"fix": "npm i -g yo@4"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"check": "gulp-cli",
|
|
202
|
+
"passed": true,
|
|
203
|
+
"message": "gulp-cli v2.3.0",
|
|
204
|
+
"version": "2.3.0"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"check": "typescript",
|
|
208
|
+
"passed": true,
|
|
209
|
+
"message": "bundled typescript used"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
</TabItem>
|
|
109
215
|
<TabItem value="Text">
|
|
110
216
|
|
|
111
217
|
```text
|
|
@@ -32,7 +32,7 @@ m365 spo site apppermission add [options]
|
|
|
32
32
|
|
|
33
33
|
## Remarks
|
|
34
34
|
|
|
35
|
-
To set permissions, specify at minimum either `appId` or `
|
|
35
|
+
To set permissions, specify at minimum either `appId` or `appDisplayName`. For best performance specify both values to avoid extra lookup.
|
|
36
36
|
|
|
37
37
|
## Example
|
|
38
38
|
|