@pnp/cli-microsoft365 10.8.0-beta.26ade35 → 10.8.0-beta.7160233
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 -1
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/config.js +1 -0
- package/dist/m365/app/commands/app-get.js +5 -2
- package/dist/m365/app/commands/app-open.js +9 -22
- package/dist/m365/app/commands/permission/permission-add.js +18 -30
- package/dist/m365/app/commands/permission/permission-list.js +5 -2
- package/dist/m365/base/AppCommand.js +9 -25
- package/dist/m365/booking/commands/business/business-get.js +18 -25
- package/dist/m365/cli/commands/app/app-reconsent.js +103 -0
- package/dist/m365/cli/commands.js +1 -0
- package/dist/m365/context/commands/context-remove.js +12 -25
- package/dist/m365/context/commands/option/option-remove.js +11 -25
- package/dist/m365/graph/commands/directoryextension/directoryextension-list.js +74 -0
- package/dist/m365/graph/commands.js +1 -0
- package/dist/m365/spe/commands/container/container-add.js +85 -0
- package/dist/m365/spe/commands/container/container-list.js +2 -9
- package/dist/m365/spe/commands/container/container-recyclebinitem-list.js +62 -0
- package/dist/m365/spe/commands/container/container-remove.js +99 -0
- package/dist/m365/spe/commands/containertype/containertype-add.js +11 -11
- package/dist/m365/spe/commands/containertype/containertype-get.js +28 -32
- package/dist/m365/spe/commands/containertype/containertype-list.js +14 -4
- package/dist/m365/spe/commands/containertype/containertype-remove.js +81 -0
- package/dist/m365/spe/commands.js +5 -1
- package/dist/utils/entraServicePrincipal.js +11 -0
- package/dist/utils/formatting.js +12 -0
- package/dist/utils/spe.js +77 -0
- package/dist/utils/spo.js +0 -18
- package/docs/docs/cmd/cli/app/app-reconsent.mdx +63 -0
- package/docs/docs/cmd/graph/directoryextension/directoryextension-list.mdx +135 -0
- package/docs/docs/cmd/spe/container/container-activate.mdx +0 -2
- package/docs/docs/cmd/spe/container/container-add.mdx +128 -0
- package/docs/docs/cmd/spe/container/container-recyclebinitem-list.mdx +96 -0
- package/docs/docs/cmd/spe/container/container-remove.mdx +65 -0
- package/docs/docs/cmd/spe/containertype/containertype-add.mdx +9 -1
- package/docs/docs/cmd/spe/containertype/containertype-get.mdx +8 -0
- package/docs/docs/cmd/spe/containertype/containertype-list.mdx +8 -0
- package/docs/docs/cmd/spe/containertype/containertype-remove.mdx +52 -0
- package/package.json +1 -1
- package/dist/m365/spe/ContainerProperties.js +0 -2
package/dist/utils/formatting.js
CHANGED
|
@@ -177,6 +177,18 @@ export const formatting = {
|
|
|
177
177
|
resultAsKeyValuePair[obj[key]] = obj;
|
|
178
178
|
});
|
|
179
179
|
return resultAsKeyValuePair;
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Extracts the GUID from a string in CSOM format.
|
|
183
|
+
* @param str The string to extract the GUID from
|
|
184
|
+
* @description The string should be in the format /Guid(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)/
|
|
185
|
+
* @returns The extracted GUID or the original string if no match is found
|
|
186
|
+
* @example /Guid(eae15efb-ac09-49b9-8906-e579efd622e4)/ => eae15efb-ac09-49b9-8906-e579efd622e4
|
|
187
|
+
*/
|
|
188
|
+
extractCsomGuid(str) {
|
|
189
|
+
const guidPattern = /\/Guid\(([0-9a-f-]+)\)\//i;
|
|
190
|
+
const match = str.match(guidPattern);
|
|
191
|
+
return match ? match[1] : str;
|
|
180
192
|
}
|
|
181
193
|
};
|
|
182
194
|
//# sourceMappingURL=formatting.js.map
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import request from '../request.js';
|
|
2
|
+
import { formatting } from './formatting.js';
|
|
3
|
+
import { cli } from '../cli/cli.js';
|
|
4
|
+
import config from '../config.js';
|
|
5
|
+
import { odata } from './odata.js';
|
|
6
|
+
const graphResource = 'https://graph.microsoft.com';
|
|
7
|
+
export const spe = {
|
|
8
|
+
/**
|
|
9
|
+
* Get all container types.
|
|
10
|
+
* @param spoAdminUrl The URL of the SharePoint Online admin center site (e.g. https://contoso-admin.sharepoint.com)
|
|
11
|
+
* @returns Array of container types
|
|
12
|
+
*/
|
|
13
|
+
async getAllContainerTypes(spoAdminUrl) {
|
|
14
|
+
const requestOptions = {
|
|
15
|
+
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
16
|
+
headers: {
|
|
17
|
+
accept: 'application/json;odata=nometadata'
|
|
18
|
+
},
|
|
19
|
+
responseType: 'json',
|
|
20
|
+
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><ObjectPath Id="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
21
|
+
};
|
|
22
|
+
const json = await request.post(requestOptions);
|
|
23
|
+
const response = json[0];
|
|
24
|
+
if (response.ErrorInfo) {
|
|
25
|
+
throw new Error(response.ErrorInfo.ErrorMessage);
|
|
26
|
+
}
|
|
27
|
+
const containerTypes = json[json.length - 1];
|
|
28
|
+
// Format the response to remove CSOM GUIDs and convert them to real GUIDs
|
|
29
|
+
containerTypes.forEach(ct => {
|
|
30
|
+
delete ct._ObjectType_;
|
|
31
|
+
ct.AzureSubscriptionId = formatting.extractCsomGuid(ct.AzureSubscriptionId);
|
|
32
|
+
ct.ContainerTypeId = formatting.extractCsomGuid(ct.ContainerTypeId);
|
|
33
|
+
ct.OwningAppId = formatting.extractCsomGuid(ct.OwningAppId);
|
|
34
|
+
ct.OwningTenantId = formatting.extractCsomGuid(ct.OwningTenantId);
|
|
35
|
+
});
|
|
36
|
+
return containerTypes;
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Get the ID of a container type by its name.
|
|
40
|
+
* @param spoAdminUrl SharePoint Online admin center URL (e.g. https://contoso-admin.sharepoint.com)
|
|
41
|
+
* @param name Name of the container type to search for
|
|
42
|
+
* @returns ID of the container type
|
|
43
|
+
*/
|
|
44
|
+
async getContainerTypeIdByName(spoAdminUrl, name) {
|
|
45
|
+
const allContainerTypes = await this.getAllContainerTypes(spoAdminUrl);
|
|
46
|
+
const containerTypes = allContainerTypes.filter(ct => ct.DisplayName.toLowerCase() === name.toLowerCase());
|
|
47
|
+
if (containerTypes.length === 0) {
|
|
48
|
+
throw new Error(`The specified container type '${name}' does not exist.`);
|
|
49
|
+
}
|
|
50
|
+
if (containerTypes.length > 1) {
|
|
51
|
+
const containerTypeKeyValuePair = formatting.convertArrayToHashTable('ContainerTypeId', containerTypes);
|
|
52
|
+
const containerType = await cli.handleMultipleResultsFound(`Multiple container types with name '${name}' found.`, containerTypeKeyValuePair);
|
|
53
|
+
return containerType.ContainerTypeId;
|
|
54
|
+
}
|
|
55
|
+
return containerTypes[0].ContainerTypeId;
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Get the ID of a container by its name.
|
|
59
|
+
* @param containerTypeId ID of the container type.
|
|
60
|
+
* @param name Name of the container to search for.
|
|
61
|
+
* @returns ID of the container.
|
|
62
|
+
*/
|
|
63
|
+
async getContainerIdByName(containerTypeId, name) {
|
|
64
|
+
const containers = await odata.getAllItems(`${graphResource}/v1.0/storage/fileStorage/containers?$filter=containerTypeId eq ${containerTypeId}&$select=id,displayName`);
|
|
65
|
+
const matchingContainers = containers.filter(c => c.displayName.toLowerCase() === name.toLowerCase());
|
|
66
|
+
if (matchingContainers.length === 0) {
|
|
67
|
+
throw new Error(`The specified container '${name}' does not exist.`);
|
|
68
|
+
}
|
|
69
|
+
if (matchingContainers.length > 1) {
|
|
70
|
+
const containerKeyValuePair = formatting.convertArrayToHashTable('id', matchingContainers);
|
|
71
|
+
const container = await cli.handleMultipleResultsFound(`Multiple containers with name '${name}' found.`, containerKeyValuePair);
|
|
72
|
+
return container.id;
|
|
73
|
+
}
|
|
74
|
+
return matchingContainers[0].id;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=spe.js.map
|
package/dist/utils/spo.js
CHANGED
|
@@ -53,24 +53,6 @@ export const spo = {
|
|
|
53
53
|
};
|
|
54
54
|
return context;
|
|
55
55
|
},
|
|
56
|
-
async getAllContainerTypes(spoAdminUrl, logger, verbose) {
|
|
57
|
-
const formDigestInfo = await spo.ensureFormDigest(spoAdminUrl, logger, undefined, verbose);
|
|
58
|
-
const requestOptions = {
|
|
59
|
-
url: `${spoAdminUrl}/_vti_bin/client.svc/ProcessQuery`,
|
|
60
|
-
headers: {
|
|
61
|
-
'X-RequestDigest': formDigestInfo.FormDigestValue
|
|
62
|
-
},
|
|
63
|
-
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><ObjectPath Id="46" ObjectPathId="45" /><Method Name="GetSPOContainerTypes" Id="47" ObjectPathId="45"><Parameters><Parameter Type="Enum">1</Parameter></Parameters></Method></Actions><ObjectPaths><Constructor Id="45" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" /></ObjectPaths></Request>`
|
|
64
|
-
};
|
|
65
|
-
const res = await request.post(requestOptions);
|
|
66
|
-
const json = JSON.parse(res);
|
|
67
|
-
const response = json[0];
|
|
68
|
-
if (response.ErrorInfo) {
|
|
69
|
-
throw new Error(response.ErrorInfo.ErrorMessage);
|
|
70
|
-
}
|
|
71
|
-
const containerTypes = json[json.length - 1];
|
|
72
|
-
return containerTypes;
|
|
73
|
-
},
|
|
74
56
|
async waitUntilFinished({ operationId, siteUrl, logger, currentContext, debug, verbose }) {
|
|
75
57
|
const resFormDigest = await spo.ensureFormDigest(siteUrl, logger, currentContext, debug);
|
|
76
58
|
currentContext = resFormDigest;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# cli app reconsent
|
|
6
|
+
|
|
7
|
+
Reconsent all permission scopes used in CLI for Microsoft 365
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 cli app reconsent [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
<Global />
|
|
18
|
+
|
|
19
|
+
## Remarks
|
|
20
|
+
|
|
21
|
+
This command will add all missing scopes used in CLI for Microsoft 365 to your current app registration. It will only add missing scopes and won't remove any scopes that are already present in the app registration.
|
|
22
|
+
|
|
23
|
+
## Examples
|
|
24
|
+
|
|
25
|
+
Consent all permission scopes used in CLI for Microsoft 365 to the current app registration
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
m365 cli app reconsent
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Response
|
|
32
|
+
|
|
33
|
+
<Tabs>
|
|
34
|
+
<TabItem value="JSON">
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
"To consent to the new scopes for your Microsoft Entra application registration, please navigate to the following URL: https://login.microsoftonline.com/f72203fd-b0a0-472d-85eb-079a117a80de/adminconsent?client_id=62b981af-59d3-4d25-8baf-6cc067a03102"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
</TabItem>
|
|
41
|
+
<TabItem value="Text">
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
To consent to the new scopes for your Microsoft Entra application registration, please navigate to the following URL: https://login.microsoftonline.com/f72203fd-b0a0-472d-85eb-079a117a80de/adminconsent?client_id=62b981af-59d3-4d25-8baf-6cc067a03102
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
</TabItem>
|
|
48
|
+
<TabItem value="CSV">
|
|
49
|
+
|
|
50
|
+
```csv
|
|
51
|
+
To consent to the new scopes for your Microsoft Entra application registration, please navigate to the following URL: https://login.microsoftonline.com/f72203fd-b0a0-472d-85eb-079a117a80de/adminconsent?client_id=62b981af-59d3-4d25-8baf-6cc067a03102
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
</TabItem>
|
|
55
|
+
<TabItem value="Markdown">
|
|
56
|
+
|
|
57
|
+
```md
|
|
58
|
+
To consent to the new scopes for your Microsoft Entra application registration, please navigate to the following URL: https://login.microsoftonline.com/f72203fd-b0a0-472d-85eb-079a117a80de/adminconsent?client_id=62b981af-59d3-4d25-8baf-6cc067a03102
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
</TabItem>
|
|
62
|
+
</Tabs>
|
|
63
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# graph directoryextension list
|
|
6
|
+
|
|
7
|
+
Retrieves a list of directory extensions
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 graph directoryextension list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--appId [appId]`
|
|
19
|
+
: Application (client) ID of the Entra application where the directory extensions are registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
|
|
20
|
+
|
|
21
|
+
`--appObjectId [appObjectId]`
|
|
22
|
+
: Object ID of the Entra application where the directory extensions are registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
|
|
23
|
+
|
|
24
|
+
`--appName [appName]`
|
|
25
|
+
: The name of Entra application where the directory extensions are registered. Specify either `appId`, `appObjectId` or `appName`, but not multiple.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
<Global />
|
|
29
|
+
|
|
30
|
+
## Remarks
|
|
31
|
+
|
|
32
|
+
When neither `appId`, `appObjectId` nor `appName` is specified, the command will return all available directory extensions including those registered for multi-tenant apps.
|
|
33
|
+
|
|
34
|
+
https://learn.microsoft.com/en-us/graph/api/directoryobject-getavailableextensionproperties?view=graph-rest-1.0&tabs=http
|
|
35
|
+
|
|
36
|
+
Otherwise, it will return directory extensions for a specific application.
|
|
37
|
+
|
|
38
|
+
https://learn.microsoft.com/en-us/graph/api/application-list-extensionproperty?view=graph-rest-1.0&tabs=http
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
Get all available directory extensions including those registered for multi-tenant apps
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
m365 graph directoryextension list
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Get all directory extensions registered for an application specified by app id.
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
m365 graph directoryextension list --appId fd918e4b-c821-4efb-b50a-5eddd23afc6f
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Get all directory extensions registered for an application specified by app object id.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
m365 graph directoryextension list --appObjectId 1caf7dcd-7e83-4c3a-94f7-932a1299c844
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Get all directory extensions registered for an application specified by name.
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
m365 graph directoryextension list --appName ContosoApp
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Response
|
|
67
|
+
|
|
68
|
+
<Tabs>
|
|
69
|
+
<TabItem value="JSON">
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
"id": "8133c498-ad76-4a7b-90a0-675bf5adf492",
|
|
75
|
+
"deletedDateTime": null,
|
|
76
|
+
"appDisplayName": "ContosoApp",
|
|
77
|
+
"dataType": "String",
|
|
78
|
+
"isMultiValued": true,
|
|
79
|
+
"isSyncedFromOnPremises": false,
|
|
80
|
+
"name": "extension_66eac1c505384aec9e024b9e60f5e4b9_jobGroup",
|
|
81
|
+
"targetObjects": [
|
|
82
|
+
"User"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
</TabItem>
|
|
89
|
+
<TabItem value="Text">
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
appDisplayName : ContosoApp
|
|
93
|
+
dataType : String
|
|
94
|
+
deletedDateTime : null
|
|
95
|
+
id : 8133c498-ad76-4a7b-90a0-675bf5adf492
|
|
96
|
+
isMultiValued : true
|
|
97
|
+
isSyncedFromOnPremises: false
|
|
98
|
+
name : extension_66eac1c505384aec9e024b9e60f5e4b9_jobGroup
|
|
99
|
+
targetObjects : ["User"]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
</TabItem>
|
|
103
|
+
<TabItem value="CSV">
|
|
104
|
+
|
|
105
|
+
```csv
|
|
106
|
+
id,deletedDateTime,appDisplayName,dataType,isMultiValued,isSyncedFromOnPremises,name
|
|
107
|
+
8133c498-ad76-4a7b-90a0-675bf5adf492,,ContosoApp,String,1,0,extension_66eac1c505384aec9e024b9e60f5e4b9_jobGroup
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
</TabItem>
|
|
111
|
+
<TabItem value="Markdown">
|
|
112
|
+
|
|
113
|
+
```md
|
|
114
|
+
# graph directoryextension list --debug "false" --verbose "false" --appId "66eac1c5-0538-4aec-9e02-4b9e60f5e4b9"
|
|
115
|
+
|
|
116
|
+
Date: 3/23/2025
|
|
117
|
+
|
|
118
|
+
## extension_66eac1c505384aec9e024b9e60f5e4b9_jobGroup (8133c498-ad76-4a7b-90a0-675bf5adf492)
|
|
119
|
+
|
|
120
|
+
Property | Value
|
|
121
|
+
---------|-------
|
|
122
|
+
id | 8133c498-ad76-4a7b-90a0-675bf5adf492
|
|
123
|
+
appDisplayName | ContosoApp
|
|
124
|
+
dataType | String
|
|
125
|
+
isMultiValued | true
|
|
126
|
+
isSyncedFromOnPremises | false
|
|
127
|
+
name | extension\_66eac1c505384aec9e024b9e60f5e4b9\_jobGroup
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
</TabItem>
|
|
131
|
+
</Tabs>
|
|
132
|
+
|
|
133
|
+
## More information
|
|
134
|
+
|
|
135
|
+
- Directory extensions: https://learn.microsoft.com/graph/extensibility-overview#directory-microsoft-entra-id-extensions
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container add
|
|
6
|
+
|
|
7
|
+
Creates a new container
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container add [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`-n, --name <name>`
|
|
19
|
+
: The display name of the new container.
|
|
20
|
+
|
|
21
|
+
`-d, --description [description]`
|
|
22
|
+
: The description of the new container.
|
|
23
|
+
|
|
24
|
+
`--containerTypeId [containerTypeId]`
|
|
25
|
+
: The container type ID of the container instance. Use either `containerTypeId`, or `containerTypeName` but not both.
|
|
26
|
+
|
|
27
|
+
`--containerTypeName [containerTypeName]`
|
|
28
|
+
: The container type name of the container instance. Use either `containerTypeId`, or `containerTypeName` but not both.
|
|
29
|
+
|
|
30
|
+
`--ocrEnabled [ocrEnabled]`
|
|
31
|
+
: Indicates whether Optical Character Recognition (OCR) is enabled for the container. Possible values: `true`, `false`. Defaults to `false`.
|
|
32
|
+
|
|
33
|
+
`--itemMajorVersionLimit [itemMajorVersionLimit]`
|
|
34
|
+
: The maximum major versions allowed for items in the container. Defaults to `500`.
|
|
35
|
+
|
|
36
|
+
`--itemVersioningEnabled [itemVersioningEnabled]`
|
|
37
|
+
: Indicates whether versioning is enabled for items in the container. Possible values: `true`, `false`. Defaults to `true`.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<Global />
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
|
|
44
|
+
Creates a new container by specifying the container type ID
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Creates a new container by specifying the container type name
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
m365 spe container add --name Invoices --containerTypeName "Invoice app container type"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Creates a new container with additional options
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
m365 spe container add --name Invoices --containerTypeId bba89883-47c2-455b-956b-7a3d8db007fb --ocrEnabled true --itemMajorVersionLimit 200 --itemVersioningEnabled true
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Response
|
|
63
|
+
|
|
64
|
+
<Tabs>
|
|
65
|
+
<TabItem value="JSON">
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
|
|
70
|
+
"displayName": "Invoices",
|
|
71
|
+
"description": "This container is used to store invoices",
|
|
72
|
+
"containerTypeId": "bfdd048e-e03f-47d2-bd16-dbbc27281aa3",
|
|
73
|
+
"status": "inactive",
|
|
74
|
+
"createdDateTime": "2025-04-15T13:31:09.62Z",
|
|
75
|
+
"lockState": "unlocked",
|
|
76
|
+
"settings": {
|
|
77
|
+
"isOcrEnabled": false,
|
|
78
|
+
"itemMajorVersionLimit": 500,
|
|
79
|
+
"isItemVersioningEnabled": true
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
</TabItem>
|
|
85
|
+
<TabItem value="Text">
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
containerTypeId: bfdd048e-e03f-47d2-bd16-dbbc27281aa3
|
|
89
|
+
createdDateTime: 2025-04-15T15:14:03.89Z
|
|
90
|
+
description : This container is used to store invoices
|
|
91
|
+
displayName : Invoices
|
|
92
|
+
id : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
93
|
+
lockState : unlocked
|
|
94
|
+
settings : {"isOcrEnabled":false,"itemMajorVersionLimit":500,"isItemVersioningEnabled":true}
|
|
95
|
+
status : inactive
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</TabItem>
|
|
99
|
+
<TabItem value="CSV">
|
|
100
|
+
|
|
101
|
+
```csv
|
|
102
|
+
id,displayName,description,containerTypeId,status,createdDateTime,lockState
|
|
103
|
+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,Invoices,This container is used to store invoices,bfdd048e-e03f-47d2-bd16-dbbc27281aa3,inactive,2025-04-15T15:14:45.317Z,unlocked
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
</TabItem>
|
|
107
|
+
<TabItem value="Markdown">
|
|
108
|
+
|
|
109
|
+
```md
|
|
110
|
+
# spe container add --name "Invoices" --containerTypeId "bfdd048e-e03f-47d2-bd16-dbbc27281aa3" --description "This container is used to store invoices"
|
|
111
|
+
|
|
112
|
+
Date: 15/04/2025
|
|
113
|
+
|
|
114
|
+
## Invoices (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
|
|
115
|
+
|
|
116
|
+
Property | Value
|
|
117
|
+
---------|-------
|
|
118
|
+
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
119
|
+
displayName | Invoices
|
|
120
|
+
description | This container is used to store invoices
|
|
121
|
+
containerTypeId | bfdd048e-e03f-47d2-bd16-dbbc27281aa3
|
|
122
|
+
status | inactive
|
|
123
|
+
createdDateTime | 2025-04-15T15:15:19.123Z
|
|
124
|
+
lockState | unlocked
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
</TabItem>
|
|
128
|
+
</Tabs>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
import Tabs from '@theme/Tabs';
|
|
3
|
+
import TabItem from '@theme/TabItem';
|
|
4
|
+
|
|
5
|
+
# spe container recyclebinitem list
|
|
6
|
+
|
|
7
|
+
Lists deleted containers of a specific container type
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
m365 spe container recyclebinitem list [options]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Options
|
|
16
|
+
|
|
17
|
+
```md definition-list
|
|
18
|
+
`--containerTypeId [containerTypeId]`
|
|
19
|
+
: The container type ID of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
|
|
20
|
+
|
|
21
|
+
`--containerTypeName [containerTypeName]`
|
|
22
|
+
: The container type name of the container instance. Use either `containerTypeId` or `containerTypeName` but not both.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
<Global />
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
List deleted containers of a specific container type specified by id.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
m365 spe container recyclebinitem list --containerTypeId "91710488-5756-407f-9046-fbe5f0b4de73"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
List deleted containers of a specific container type specified by name.
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
m365 spe container recyclebinitem list --containerTypeName "My container type name"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Response
|
|
42
|
+
|
|
43
|
+
<Tabs>
|
|
44
|
+
<TabItem value="JSON">
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
[
|
|
48
|
+
{
|
|
49
|
+
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
|
|
50
|
+
"displayName": "My Application Storage Container",
|
|
51
|
+
"containerTypeId": "1a55ba46-a673-45a4-b0d9-bd9913d06957",
|
|
52
|
+
"createdDateTime": "2025-04-15T21:51:48Z",
|
|
53
|
+
"settings": {
|
|
54
|
+
"isOcrEnabled": false
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
</TabItem>
|
|
61
|
+
<TabItem value="Text">
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
id displayName
|
|
65
|
+
------------------------------------------------------------------ --------------------------------
|
|
66
|
+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z My Application Storage Container
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
</TabItem>
|
|
70
|
+
<TabItem value="CSV">
|
|
71
|
+
|
|
72
|
+
```csv
|
|
73
|
+
id,displayName,containerTypeId,createdDateTime
|
|
74
|
+
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,My Application Storage Container,1a55ba46-a673-45a4-b0d9-bd9913d06957,2025-04-15T21:51:48Z
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
</TabItem>
|
|
78
|
+
<TabItem value="Markdown">
|
|
79
|
+
|
|
80
|
+
```md
|
|
81
|
+
# spe container recyclebinitem list --containerTypeId "1a55ba46-a673-45a4-b0d9-bd9913d06957"
|
|
82
|
+
|
|
83
|
+
Date: 18/04/2025
|
|
84
|
+
|
|
85
|
+
## My Application Storage Container (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
|
|
86
|
+
|
|
87
|
+
Property | Value
|
|
88
|
+
---------|-------
|
|
89
|
+
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
|
|
90
|
+
displayName | My Application Storage Container
|
|
91
|
+
containerTypeId | 1a55ba46-a673-45a4-b0d9-bd9913d06957
|
|
92
|
+
createdDateTime | 2025-04-15T21:51:48Z
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
</TabItem>
|
|
96
|
+
</Tabs>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import Global from '/docs/cmd/_global.mdx';
|
|
2
|
+
|
|
3
|
+
# spe container remove
|
|
4
|
+
|
|
5
|
+
Removes a container
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
m365 spe container remove [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Options
|
|
14
|
+
|
|
15
|
+
```md definition-list
|
|
16
|
+
`-i, --id [id]`
|
|
17
|
+
: The ID of the container instance. Specify either `id` or `name` but not both.
|
|
18
|
+
|
|
19
|
+
`-n, --name [name]`
|
|
20
|
+
: The name of the container instance. Specify either `id` or `name` but not both.
|
|
21
|
+
|
|
22
|
+
`--containerTypeId [containerTypeId]`
|
|
23
|
+
: The ID of the container type. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
|
|
24
|
+
|
|
25
|
+
`--containerTypeName [containerTypeName]`
|
|
26
|
+
: The name of the container type. Specify either `containerTypeId` or `containerTypeName` when using `name` but not both.
|
|
27
|
+
|
|
28
|
+
`--recycle`
|
|
29
|
+
: Recycle the container instance instead of permanently deleting it.
|
|
30
|
+
|
|
31
|
+
`-f, --force`
|
|
32
|
+
: Do not prompt for confirmation.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
<Global />
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
Remove a container by ID.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Move a container specified by ID to the recycle bin.
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
m365 spe container remove --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --recycle
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Remove a container by name specifying the container type id.
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
m365 spe container remove --name "My Application Storage Container" --containerTypeId d248c449-da7e-4119-b5f6-7bb0865a42f9
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Remove a container by name specifying the container type name.
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
m365 spe container remove --name "My Application Storage Container" --containerTypeName "My Application Container Type"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Response
|
|
64
|
+
|
|
65
|
+
The command won't return a response on success.
|
|
@@ -38,8 +38,16 @@ m365 spe containertype add [options]
|
|
|
38
38
|
|
|
39
39
|
## Remarks
|
|
40
40
|
|
|
41
|
+
:::info
|
|
42
|
+
|
|
43
|
+
To use this command you must be either **SharePoint Administrator** or **Global Administrator**.
|
|
44
|
+
|
|
45
|
+
:::
|
|
46
|
+
|
|
41
47
|
:::note
|
|
42
|
-
|
|
48
|
+
|
|
49
|
+
You can only create one Trial container type per tenant, a single application registration can only contain one container type and a tenant can contain a maximum of five containers types in total.
|
|
50
|
+
|
|
43
51
|
:::
|
|
44
52
|
|
|
45
53
|
## Examples
|
|
@@ -16,6 +16,14 @@ m365 spe containertype list [options]
|
|
|
16
16
|
|
|
17
17
|
<Global />
|
|
18
18
|
|
|
19
|
+
## Remarks
|
|
20
|
+
|
|
21
|
+
:::info
|
|
22
|
+
|
|
23
|
+
To use this command you must be either **SharePoint Administrator** or **Global Administrator**.
|
|
24
|
+
|
|
25
|
+
:::
|
|
26
|
+
|
|
19
27
|
## Examples
|
|
20
28
|
|
|
21
29
|
Retrieves a list of Container Types created for a SharePoint Embedded Application from the tenant.
|