spe containertype add
Creates a new container type
Usage
m365 spe containertype add [options]
Options
-n, --name <name>
Container type name.
--appId [appId]
Application ID of the Microsoft Entra ID app that will be the owner of the container type. By default, the current app is used.
--billingType [billingType]
The billing type. The possible values are:
standard
,trial
,directToCustomer
,unknownFutureValue
. The default value isstandard
.--consumingTenantOverridables [consumingTenantOverridables]
A comma-separated list of settings that can be overridden in the consuming tenant. The possible values are:
urlTemplate
,isDiscoverabilityEnabled
,isSearchEnabled
,isItemVersioningEnabled
,itemMajorVersionLimit
,maxStoragePerContainerInBytes
.--isDiscoverabilityEnabled [isDiscoverabilityEnabled]
Indicates whether items from containers are surfaced in experiences such as My Activity or Microsoft 365. Valid values:
true
,false
. The default value isfalse
.--isItemVersioningEnabled [isItemVersioningEnabled]
Indicates whether item versioning is enabled for the container. Valid values:
true
,false
. The default value istrue
.--itemMajorVersionLimit [itemMajorVersionLimit]
Maximum number of versions.
isItemVersioningEnabled
must be enabled. Default value is500
.--isSearchEnabled [isSearchEnabled]
Indicates whether search is enabled. Valid values:
true
,false
. The default value istrue
.--isSharingRestricted [isSharingRestricted]
Only the manager and owner can share files in the container if restricted sharing is enabled. Valid values:
true
,false
. The default value isfalse
.--maxStoragePerContainerInBytes [maxStoragePerContainerInBytes]
Controls maximum storage in bytes.
--sharingCapability [sharingCapability]
Sharing capabilities permitted for containers. The possible values are:
disabled
,externalUserSharingOnly
,externalUserAndGuestSharing
,existingExternalUserSharingOnly
.--urlTemplate [urlTemplate]
Pattern used to redirect files.
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,permissions
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
The command is based on an API that is currently in preview and is subject to change once the API reached general availability.
The tenant must own the application that is assigned as the owner of the container type.
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.
The registration of a container type in a newly created tenant can fail if the tenant isn't yet fully ready. You might need to wait at least an hour before you can register a container type in a new tenant.
Permissions
- Delegated
- Application
Resource | Permissions |
---|---|
Microsoft Graph | FileStorageContainerType.Manage.All |
To use this command you must be either SharePoint Administrator or Global Administrator.
This command does not support application permissions.
Examples
Adds a new trial container type.
m365 spe containertype add --name 'trial container' --applicationId '1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac' --billingType trial
Adds a new container type using a standard billing type for the current application.
m365 spe containertype add --name 'standard container'
Adds a new container type with additional settings
m365 spe containertype add --name 'Contoso container type' --appId 5181cccf-7a36-44c1-a00d-62581ca4d14a --billingType directToCustomer --consumingTenantOverridables "isDiscoverabilityEnabled, isSearchEnabled" --isDiscoverabilityEnabled true --isItemVersioningEnabled true --isSearchEnabled false --itemMajorVersionLimit 25 --isSharingRestricted true --maxStoragePerContainerInBytes 102030 --sharingCapability externalUserSharingOnly --urlTemplate "https://app.contoso.com/redirect?item={item-id}"
Response
- JSON
- Text
- CSV
- Markdown
{
"id": "ac8ac926-f924-4f89-bdc0-4e569c143a4d",
"name": "Contoso container types",
"owningAppId": "0e083c20-ad1c-4b45-93a6-6dd58fe4d694",
"billingClassification": "trial",
"billingStatus": "valid",
"createdDateTime": "2025-08-28T06:13:12.0080609Z",
"etag": "MC4wLjAuMA==",
"settings": {
"sharingCapability": "externalUserSharingOnly",
"urlTemplate": "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}",
"isDiscoverabilityEnabled": false,
"isSearchEnabled": true,
"isItemVersioningEnabled": true,
"itemMajorVersionLimit": 500,
"maxStoragePerContainerInBytes": 27487790694400,
"isSharingRestricted": false,
"consumingTenantOverridables": "isSearchEnabled,itemMajorVersionLimit"
}
}
billingClassification: trial
billingStatus : valid
createdDateTime : 2025-08-28T06:13:12.0080609Z
etag : MC4wLjAuMA==
id : ac8ac926-f924-4f89-bdc0-4e569c143a4d
name : Contoso container types
owningAppId : 0e083c20-ad1c-4b45-93a6-6dd58fe4d694
settings : {"sharingCapability":"externalUserSharingOnly","urlTemplate":"https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}","isDiscoverabilityEnabled":false,"isSearchEnabled":true,"isItemVersioningEnabled":true,"itemMajorVersionLimit":500,"maxStoragePerContainerInBytes":27487790694400,"isSharingRestricted":false,"consumingTenantOverridables":"isSearchEnabled,itemMajorVersionLimit"}
id,name,owningAppId,billingClassification,billingStatus,createdDateTime,etag
ac8ac926-f924-4f89-bdc0-4e569c143a4d,Contoso container types,0e083c20-ad1c-4b45-93a6-6dd58fe4d694,trial,valid,2025-08-28T06:13:12.0080609Z,MC4wLjAuMA==
# spe containertype add --name "Contoso container types" --billingType "trial" --consumingTenantOverridables "isSearchEnabled,itemMajorVersionLimit" --sharingCapability "externalUserSharingOnly" --urlTemplate "https://app.contoso.com/redirect?tenant={tenant-id}&drive={drive-id}&folder={folder-id}&item={item-id}"
Date: 28/08/2025
## Contoso container types (ac8ac926-f924-4f89-bdc0-4e569c143a4d)
Property | Value
---------|-------
id | ac8ac926-f924-4f89-bdc0-4e569c143a4d
name | Contoso container types
owningAppId | 0e083c20-ad1c-4b45-93a6-6dd58fe4d694
billingClassification | trial
billingStatus | valid
createdDateTime | 2025-08-28T06:13:12.0080609Z
etag | MC4wLjAuMA==
More information
In SharePoint Embedded, all files and documents are stored in Containers, and each Container is identified by a Container Type.
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.
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.
More information about SharePoint Embedded and the limits can be found at the following location: SharePoint Embedded