Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
160 changes: 160 additions & 0 deletions docs/docs/cmd/spe/container/container-set.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spe container set

Updates a SharePoint Embedded container

## Usage

```sh
m365 spe container set [options]
```

## Options

```md definition-list
`-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.
```

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|----------------------------------------------------------------|
| Microsoft Graph | FileStorageContainer.Selected, FileStorageContainer.Manage.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|-------------------------------|
| Microsoft Graph | FileStorageContainer.Selected |

</TabItem>
</Tabs>

## 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.

```sh
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --newName "Contoso Project A"
```

Update description only.

```sh
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --description "Files for the Contoso Project A team"
```

Disable OCR for a container.

```sh
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isOcrEnabled false
```

Enable versioning and set the major version limit.

```sh
m365 spe container set --id "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --isItemVersioningEnabled true --itemMajorVersionLimit 100
```

Update name, description, and settings together.

```sh
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

<Tabs>
<TabItem value="JSON">

```json
{
"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
}
}
```

</TabItem>
<TabItem value="Text">

```text
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
```

</TabItem>
<TabItem value="CSV">

```csv
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
```

</TabItem>
<TabItem value="Markdown">

```md
# 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
```

</TabItem>
</Tabs>
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,11 @@ const sidebars: SidebarsConfig = {
label: 'container remove',
id: 'cmd/spe/container/container-remove'
},
{
type: 'doc',
label: 'container set',
id: 'cmd/spe/container/container-set'
},
{
type: 'doc',
label: 'container permission list',
Expand Down
1 change: 1 addition & 0 deletions src/m365/spe/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
CONTAINER_GET: `${prefix} container get`,
CONTAINER_LIST: `${prefix} container list`,
CONTAINER_REMOVE: `${prefix} container remove`,
CONTAINER_SET: `${prefix} container set`,
CONTAINER_PERMISSION_LIST: `${prefix} container permission list`,
CONTAINER_RECYCLEBINITEM_LIST: `${prefix} container recyclebinitem list`,
CONTAINER_RECYCLEBINITEM_REMOVE: `${prefix} container recyclebinitem remove`,
Expand Down
Loading