Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.9 KB

list-roleassignment-remove.mdx

File metadata and controls

65 lines (42 loc) · 1.9 KB

import Global from '/docs/cmd/_global.mdx';

spo list roleassignment remove

Removes a role assignment from list permissions

Usage

m365 spo list roleassignment remove [options]

Options

`-u, --webUrl <webUrl>`
: URL of the site where the list is located.

`-i, --listId [listId]`
: ID of the list. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.

`-t, --listTitle [listTitle]`
: Title of the list. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.

`--listUrl [listUrl]`
: Relative URL of the list. Specify either `listId`, `listTitle`, or `listUrl` but not multiple.

`--principalId [principalId]`
: SharePoint ID of principal it may be either user id or group id you want to remove permissions. Specify either `principalId`, `upn`, or `groupName` but not multiple.

`--upn [upn]`
: The upn/email of user. Specify either `principalId`, `upn`, or `groupName` but not multiple.

`--groupName [groupName]`
: The group name of Microsoft Entra or SharePoint group. Specify either `principalId`, `upn`, or `groupName` but not multiple.

`-f, --force`
: Don't prompt for confirming removing the role assignment.

Examples

Remove roleassignment from list by title based on group name.

m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listTitle "someList" --groupName "saleGroup"

Remove roleassignment from list by title based on principal Id.

m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listTitle "Events" --principalId 2

Remove roleassignment from list by url based on principal Id.

m365 spo list roleassignment remove --webUrl "https://contoso.sharepoint.com/sites/contoso-sales" --listUrl '/sites/contoso-sales/lists/Events' --principalId 2

Response

The command won't return a response on success.