cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

New command: m365 spe container permission set

Open Adam-it opened this issue 1 year ago • 5 comments

Usage

m365 spe container permission set [options]

Description

Updates SharePoint Embedded Container permission

Options

Option Description
-i, --id <id> ID of the permission which will be modified.
--containerId [containerId] ID of the SharePoint Embedded Container. Specify either containerId or containerName but not both.
-n, --containerName [containerName] Display name of the Container. Specify either containerId or containerName but not both.
-r, --roles <roles> Comma-separated list of permissions. Possible values are reader, writer, manager, owner.

Examples

Adds a reader role for the specified user to the container

m365 spe container permission set --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z"  --id "cmVhZGVyX2k6MCMuZnxtZW1iZXJzaGlwfHJvcnlicjExMUBvdXRsb29rLmNvbQ" --roles "reader"

Default properties

No response

Additional Info

we may use the following API: https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-update-permissions?view=graph-rest-1.0&tabs=http

Adam-it avatar Jul 19 '24 20:07 Adam-it

It's similar to what I feel with the other container commands, but I find the description for containerId and permissionId a bit short and doesn't feel like it adds much of a description to the options.

Also -i, --containerId <id> should be -i, --containerId <containerId>

Jwaegebaert avatar Jul 22 '24 07:07 Jwaegebaert

It's similar to what I feel with the other container commands, but I find the description for containerId and permissionId a bit short and doesn't feel like it adds much of a description to the options.

Also -i, --containerId <id> should be -i, --containerId <containerId>

ok I worked a bit on the descriptions ✅

Adam-it avatar Jul 23 '24 06:07 Adam-it

@pnp/cli-for-microsoft-365-maintainers anything else or should we open it up?

Adam-it avatar Jul 23 '24 07:07 Adam-it

Shouldn't it be named id instead of permissionId?

milanholemans avatar Jul 23 '24 07:07 milanholemans

Shouldn't it be named id instead of permissionId?

good catch. updated ✅ anything else?

Adam-it avatar Jul 23 '24 08:07 Adam-it