-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add more options to spo user remove. closes #5522 #5806
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8feea8b
more options to spo user remove
reshmee011 0d02e90
Update src/m365/spo/commands/user/user-remove.ts
reshmee011 2e987b2
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 ccf9e57
Update src/m365/spo/commands/user/user-remove.spec.ts
reshmee011 09a9177
Update src/m365/spo/commands/user/user-remove.spec.ts
reshmee011 2529f2d
updates made based in feedback from Adam
reshmee011 d10e071
Merge branch 'pnp:main' into sporemoveoptions
reshmee011 a7f0d8c
update to entra id
reshmee011 ac135c0
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 5fb5027
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 4549290
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 06aa729
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 13ed301
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 0dac710
Update src/m365/spo/commands/user/user-remove.ts
reshmee011 886511c
Update src/m365/spo/commands/user/user-remove.spec.ts
reshmee011 088851c
Update src/m365/spo/commands/user/user-remove.ts
reshmee011 e90123b
Merge branch 'pnp:main' into sporemoveoptions
reshmee011 b36316a
Updated changes based on feedback
reshmee011 25a4d56
updates
reshmee011 f991de6
undo the commanderror as unable to get the test case to work
reshmee011 93f7e3d
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 760cc44
Update src/m365/spo/commands/user/user-remove.spec.ts
reshmee011 570aa07
Update docs/docs/cmd/spo/user/user-remove.mdx
reshmee011 fc6b91d
Update src/m365/spo/commands/user/user-remove.ts
reshmee011 e91e31e
updates
reshmee011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,38 +14,69 @@ m365 spo user remove [options] | |
|
||
```md definition-list | ||
`-u, --webUrl <webUrl>` | ||
: URL of the web to remove user | ||
: URL of the web to remove user. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--id [id]` | ||
: ID of the user to remove from web | ||
: ID of the user to remove from web. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--loginName [loginName]` | ||
: Login name of the site user to remove | ||
: Login name of the user to remove from web. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--userName [userName]` | ||
: User name of the user to remove from web. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--email [email]` | ||
: Email of the user to remove from web. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--entraGroupId [entraGroupId]` | ||
: Object ID of the Entra group ID to remove. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`--entraGroupName [entraGroupName]` | ||
: Name of the Entra group to remove. Use either `id` or `loginName` or `email`, `userName`, `entraGroupId`, or `entraGroupName`, but not all. | ||
|
||
`-f, --force` | ||
: Do not prompt for confirmation before removing user from web | ||
``` | ||
|
||
<Global /> | ||
|
||
## Remarks | ||
|
||
Use either `id` or `loginName`, but not both | ||
|
||
## Examples | ||
|
||
Removes user with id _10_ from a web without prompting for confirmation | ||
Removes user by id from a web without prompting for confirmation | ||
|
||
```sh | ||
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --id 10 --force | ||
``` | ||
|
||
Removes user with login name _i:0#.f|membership|[email protected]_ from a web | ||
Removes user by loginName from a web | ||
|
||
```sh | ||
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --loginName "i:0#.f|membership|[email protected]" | ||
``` | ||
|
||
Removes user by userName from a web | ||
|
||
```sh | ||
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --userName "john.doe_hotmail.com#ext#@mytenant.onmicrosoft.com" | ||
``` | ||
|
||
Removes user by email from a web | ||
|
||
```sh | ||
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --email "[email protected]" | ||
``` | ||
|
||
Removes user by entraGroupId from a web | ||
|
||
```sh | ||
m365 spo user remove --webUrl "https://contoso.sharepoint.com/sites/HR" --entraGroupId f832a493-de73-4fef-87ed-8c6fffd91be6 | ||
``` | ||
|
||
Removes user by entraGroupName from a web | ||
|
||
```sh | ||
m365 spo user remove --webUrl _https://contoso.sharepoint.com/sites/HR_ --entraGroupName "Test Members" | ||
``` | ||
## Response | ||
|
||
The command won't return a response on success. | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.