Skip to content

New command: spe container set #6846

@Jwaegebaert

Description

@Jwaegebaert

Usage

m365 spe container set [options]

Description

Updates a SharePoint Embedded container

Options

Option Description
-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.

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

Default properties

No response

Additional Info

A few 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.

Ref: https://learn.microsoft.com/graph/api/filestoragecontainer-update?view=graph-rest-1.0&tabs=http

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions