Open MathijsVerbeeck opened 4 months ago
Also check out my comment here: https://github.com/pnp/cli-microsoft365/issues/5882#issuecomment-1981160284
@martinlingstuyl I have updated the specs to include the --asAdmin
flag.
Should we use a -a
short?
Should we use a
-a
short?
We could, but it would be quite inconsistent as we do not use this short with the Power Platform commands that we offer.
LGTM 👍
Hi, could you assign me to this task as it is similar to other m365 spo site admin ... commands :)
Usage
m365 spo site admin remove [options]
Description
Removes a user or group as site collection administrator
Options
-u, --siteUrl <siteUrl>
--userId [userId]
--userName [userName]
--groupId [groupId]
--groupName [groupName]
--asAdmin
-f, --force
Examples
Removes user as site collection admin
Removes group as site collection admin without prompting for confirmation
Response
No response
Additional info
We should add correct error handling as when we try to remove the primary site collection admin or when we try to remove the final site collection admin, as there always has to be atleast one if I'm not mistaken