pnp / pnp/cli-microsoft365

New command: `spe containertype permission set`

Open
#6,843 1 comment 0 reactions 1 assignee View on GitHub

@milanholemans is already working on this.

Since Oct 13, 2025.

keep-open needs design new feature
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

Usage

m365 spe containertype permission set [options]

Description

Updates the app permission grant for a specific application on a SharePoint Embedded container type

Options
Option Description
-i, --containerTypeId [containerTypeId] The Id of the Container Type. Use either containerTypeId, or containerTypeName but not both.
-n, --containerTypeName [containerTypeName] The name of the Container Type. Use either containerTypeId, or containerTypeName but not both.
--appId <appId> The Application (client) Id whose grant you want to update.
--delegatedPermissions [delegatedPermissions] Comma-separated list of delegated permissions to allow. Possible values: none, readContent, writeContent, manageContent, create, delete, read, write, enumeratePermissions, addPermissions, updatePermissions, deletePermissions, deleteOwnPermission, managePermissions, full, unknownFutureValue.
--applicationPermissions [applicationPermissions] Comma-separated list of app-only permissions to allow. Possible values: none, readContent, writeContent, manageContent, create, delete, read, write, enumeratePermissions, addPermissions, updatePermissions, deletePermissions, deleteOwnPermission, managePermissions, full, unknownFutureValue.
Examples

Set app-only permissions to full by container type Id

m365 spe containertype permission set --containerTypeId de988700-d700-020e-0a00-0831f3042f00 --appId 11335700-9a00-4c00-84dd-0c210f203f00 --applicationPermissions full

Set delegated permissions to readContent,writeContent by container type name

m365 spe containertype permission set --containerTypeName "Contoso Standard CT" --appId 11335700-9a00-4c00-84dd-0c210f203f00 --delegatedPermissions readContent,writeContent

Update both delegated and app-only permissions

m365 spe containertype permission set --containerTypeName "Contoso Standard CT" --appId 11335700-9a00-4c00-84dd-0c210f203f00 --delegatedPermissions read,write --applicationPermissions manageContent

Clear delegated permissions (set to none) while keeping app-only unchanged

m365 spe containertype permission set --containerTypeId de988700-d700-020e-0a00-0831f3042f00 --appId 11335700-9a00-4c00-84dd-0c210f203f00 --delegatedPermissions none
Default properties

No response

Additional Info

A few remarks:

  • This command uses Microsoft Graph beta and is subject to change.
  • Requires new permission FileStorageContainerTypeReg.Selected.
  • When using delegated tokens, the caller must be a SharePoint Embedded admin or Global admin.
  • If the FileStorageContainerTypeReg.Selected permission is used, changes are limited to registrations owned by the application that makes the call.

Ref: https://learn.microsoft.com/graph/api/filestoragecontainertypeapppermissiongrant-update?view=graph-rest-beta

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.