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. |
--containerTypeId [containerTypeId] |
The ID of the container type. Specify either containerTypeId or containerTypeName when using containerName but not both. |
--containerTypeName [containerTypeName] |
The name of the container type. Specify either containerTypeId or containerTypeName when using 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 "jacob@fabrikam.com"
Adds a multiple roles for the specified user to the container
m365 spe container permission add --containerId "b!ISJs1WRro0y0EWgkUYcktDa0mE8zSlFEqFzqRn70Zwp1CEtDEBZgQICPkRbil_5Z" --roles "reader,writer" --userName "jacob@fabrikam.com"
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
Usage
m365 spe container permission add [options]
Description
Adds permission to SharePoint Embedded Container for a specified user
Options
-i, --containerId [containerId]containerIdorcontainerNamebut not both.-n, --containerName [containerName]containerIdorcontainerNamebut not both.--containerTypeId [containerTypeId]containerTypeIdorcontainerTypeNamewhen usingcontainerNamebut not both.--containerTypeName [containerTypeName]containerTypeIdorcontainerTypeNamewhen usingcontainerNamebut not both.-r, --roles <roles>reader,writer,manager,owner.--userName [userName]userNameoruserIdbut not both.--userId [userId]userNameoruserIdbut not both.Examples
Adds a reader role for the specified user to the container
Adds a multiple roles for the specified user to the container
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