spo user remove
Removes user from specific web
Usage
m365 spo user remove [options]
Options
-u, --webUrl <webUrl>
URL of the web to remove user
--id [id]
ID of the user to remove from web
--loginName [loginName]
Login name of the site user to remove
-f, --force
Do not prompt for confirmation before removing user from web
-h, --help [help]
Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isoptions
.--query [query]
JMESPath query string. See http://jmespath.org/ for more information and examples.
-o, --output [output]
Output type.
json
,text
,csv
,md
,none
. Defaultjson
.--verbose
Runs command with verbose logging.
--debug
Runs command with debug logging.
Remarks
Use either id
or loginName
, but not both
Examples
Removes user with id 10 from a web without prompting for confirmation
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --id 10 --force
Removes user with login name i:0#.f|membership|john.doe@mytenant.onmicrosoft.com from a web
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --loginName "i:0#.f|membership|john.doe@mytenant.onmicrosoft.com"
Response
The command won't return a response on success.