Skip to content

spo user remove

Removes user from specific web


spo user remove [options]


Option Description
--help output usage information
-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
--confirm Do not prompt for confirmation before removing user from web
--query [query] JMESPath query string. See for more information and examples
-o, --output [output] Output type. json,text. Default text
--pretty Prettifies json output
--verbose Runs command with verbose logging
--debug Runs command with debug logging


Use either id or loginName, but not both


Removes user with id 10 from web without prompting for confirmation

spo user remove --webUrl "" --id 10 --confirm

Removes user with login name i:0#.f|membership| from web

spo user remove --webUrl "" --loginName "i:0#.f|membership|"

More information