spe container set
Updates a SharePoint Embedded container
Usage
m365 spe container set [options]
Options
-i, --id <id>The Id of the container.
--newName [newName]New display name for the container.
--description [description]Description of the container.
--isOcrEnabled [isOcrEnabled]Indicates whether OCR is enabled for the container. Possible values:
true,false.--isItemVersioningEnabled [isItemVersioningEnabled]Indicates whether item versioning is enabled. Possible values:
true,false.--itemMajorVersionLimit [itemMajorVersionLimit]Maximum number of major versions to keep. Requires versioning to be enabled.
-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.--verboseRuns command with verbose logging.
--debugRuns command with debug logging.
Permissions
- Delegated
- Application
| Resource | Permissions |
|---|---|
| Microsoft Graph | FileStorageContainer.Selected |
| Resource | Permissions |
|---|---|
| Microsoft Graph | FileStorageContainer.Selected |
Remarks
In addition to Graph permissions, the app/user must have container-type level permission for the respective container type. The caller must have write access to the container (for example, writer, manager, or owner role) to update metadata/settings.
Examples
Update the container display name by Id.
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"
Update description only.
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --description "Files for the Contoso Project A team"
Disable OCR for a container.
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isOcrEnabled false
Enable versioning and set the major version limit.
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isItemVersioningEnabled true --itemMajorVersionLimit 100
Update name, description, and settings together.
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A - Phase 2" --description "Phase 2 workspace" --isOcrEnabled true --isItemVersioningEnabled true --itemMajorVersionLimit 50
Response
- JSON
- Text
- CSV
- Markdown
{
"id": "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z",
"displayName": "Contoso Project A",
"description": "Files for the Contoso Project A team",
"containerTypeId": "91710488-5756-407f-9046-fbe5f0b4de73",
"status": "active",
"createdDateTime": "2021-11-24T15:41:52.347Z",
"lockState": "unlocked",
"settings": {
"isOcrEnabled": false,
"itemMajorVersionLimit": 50,
"isItemVersioningEnabled": true
}
}
containerTypeId: 91710488-5756-407f-9046-fbe5f0b4de73
createdDateTime: 2021-11-24T15:41:52.347Z
description : Files for the Contoso Project A team
displayName : Contoso Project A
id : b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
lockState : unlocked
settings : {"isOcrEnabled":false,"itemMajorVersionLimit":50,"isItemVersioningEnabled":true}
status : active
id,displayName,description,containerTypeId,status,createdDateTime,lockState
b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z,Contoso Project A,Files for the Contoso Project A team,91710488-5756-407f-9046-fbe5f0b4de73,active,2021-11-24T15:41:52.347Z,unlocked
# spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"
Date: 07/04/2026
## Contoso Project A (b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z)
Property | Value
---------|-------
id | b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z
displayName | Contoso Project A
description | Files for the Contoso Project A team
containerTypeId | 91710488-5756-407f-9046-fbe5f0b4de73
status | active
createdDateTime | 2021-11-24T15:41:52.347Z
lockState | unlocked