Usage
m365 spo web roleassignment remove [options]
Description
removes a role assignment from web permissions
Options
| Option |
Description |
-u, --webUrl <webUrl> |
URL of the site |
--principalId [principalId] |
SharePoint ID of principal it may be either user id or group id we want to add permissions to. Specify principalId only when upn or groupName are not used. |
--upn [upn] |
upn/email of user to assign role to. Specify either upn or princpialId |
--groupName [groupName] |
enter group name of Azure AD or SharePoint group.. Specify either groupName or princpialId |
--confirm [confirm] |
Don't prompt for confirming removing the roleassignment. |
Examples
remove roleassignment from web based on group name
m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --groupName "saleGroup"
remove roleassignment from web based on principal Id
m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --principalId 2
Additional Info
we may use this POST request
/_api/web/removeroleassignment(principalid='{SomeGroupOrUserIDHere}')
Usage
m365 spo web roleassignment remove [options]
Description
removes a role assignment from web permissions
Options
-u, --webUrl <webUrl>--principalId [principalId]--upn [upn]--groupName [groupName]--confirm [confirm]Examples
remove roleassignment from web based on group name
remove roleassignment from web based on principal Id
m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --principalId 2Additional Info
we may use this POST request
/_api/web/removeroleassignment(principalid='{SomeGroupOrUserIDHere}')