Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/azdo_help_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,24 @@ Aliases
members, ls, l
```

#### `azdo team member remove [ORGANIZATION/]PROJECT/TEAM [flags]`

Remove one or more members from a team.

```
-q, --jq expression Filter JSON output using a jq expression
--json fields[=*] Output JSON with the specified fields. Prefix a field with '-' to exclude it.
-t, --template string Format JSON output using a Go template; see "azdo help formatting"
-u, --user strings Members to remove. Accepts a descriptor, email, principal name, SID, or identity ID. Pass the flag multiple times to remove several members.
-y, --yes Skip the confirmation prompt.
```

Aliases

```
r, rm, del, d
```

### `azdo team show [ORGANIZATION/]PROJECT/TEAM [flags]`

Show details of a team.
Expand Down
1 change: 1 addition & 0 deletions docs/azdo_team_member.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Manage members of a team.

* [azdo team member add](./azdo_team_member_add.md)
* [azdo team member list](./azdo_team_member_list.md)
* [azdo team member remove](./azdo_team_member_remove.md)

### See also

Expand Down
63 changes: 63 additions & 0 deletions docs/azdo_team_member_remove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## Command `azdo team member remove`

```
azdo team member remove [ORGANIZATION/]PROJECT/TEAM [flags]
```

Remove one or more users or groups from a team.

The positional argument accepts the team's project and team name in the
form [ORGANIZATION/]PROJECT/TEAM.


### Options


* `-q`, `--jq` `expression`

Filter JSON output using a jq expression

* `--json` `fields`

Output JSON with the specified fields. Prefix a field with '-' to exclude it.

* `-t`, `--template` `string`

Format JSON output using a Go template; see "azdo help formatting"

* `-u`, `--user` `strings`

Members to remove. Accepts a descriptor, email, principal name, SID, or identity ID. Pass the flag multiple times to remove several members.

* `-y`, `--yes`

Skip the confirmation prompt.


### ALIASES

- `r`
- `rm`
- `del`
- `d`

### JSON Fields

`memberDescriptor`, `memberDisplayName`, `memberOrigin`, `memberOriginId`, `results`, `status`, `teamName`

### Examples

```bash
# Remove a user by email
azdo team member remove Fabrikam/FabrikamEngineering/MyTeam --user user@example.com

# Remove multiple users in a single invocation
azdo team member remove Fabrikam/MyProject/MyTeam -u alice@contoso.com -u bob@contoso.com

# Remove a user without confirmation prompt
azdo team member remove MyOrg/Fabrikam/MyTeam --user vssgp.Uy0xLTItMw== --yes
```

### See also

* [azdo team member](./azdo_team_member.md)
2 changes: 2 additions & 0 deletions internal/cmd/team/member/member.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/spf13/cobra"
"github.com/tmeckel/azdo-cli/internal/cmd/team/member/add"
"github.com/tmeckel/azdo-cli/internal/cmd/team/member/list"
"github.com/tmeckel/azdo-cli/internal/cmd/team/member/remove"
"github.com/tmeckel/azdo-cli/internal/cmd/util"
)

Expand All @@ -14,6 +15,7 @@ func NewCmd(ctx util.CmdContext) *cobra.Command {
}

cmd.AddCommand(add.NewCmd(ctx))
cmd.AddCommand(remove.NewCmd(ctx))
cmd.AddCommand(list.NewCmd(ctx))

return cmd
Expand Down
Loading
Loading