New command: m365 spe container permission add
Usage
m365 spe container permission add [options]
Description
Adds permission to SharePoint Embedded Container for a specified user
Options
| Option | Description |
|---|---|
-i, --containerId [containerId] |
ID of a 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. |
--userName [userName] |
The upn/email of user to assign role to. Use either userName or userId but not both. |
--userId [userId] |
The id of user to assign role to. Use either userName or userId but not both. |
Examples
Adds a reader role for the specified user to the container
m365 spe container permission add --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --roles "reader" --userName "[email protected]"
Adds a multiple roles for the specified user to the container
m365 spe container permission add --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --roles "reader,writer" --userName "[email protected]"
Default properties
No response
Additional Info
we may use the following API for that: https://learn.microsoft.com/en-us/graph/api/filestoragecontainer-post-permissions?view=graph-rest-1.0&tabs=http
One improvement could be adding another example, maybe one with multiple roles. We could also add userId, so they can set permissions using the user Entra ID.
I think upn should also be renamed to userName to be consistent with other commands.
I think
upnshould also be renamed touserNameto be consistent with other commands.
updated ✅
One improvement could be adding another example, maybe one with multiple roles. We could also add
userId, so they can set permissions using the user Entra ID.
Added additional example ✅ Improved a bit description ✅ and the description of the container ID ✅ Good call with the userId. added ✅
@pnp/cli-for-microsoft-365-maintainers any other feed or should we open it up?
Made a few small remaining changes. LGTM!