Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli iam team user delete

On this page

  • Syntax
  • Arguments
  • Options
  • Output
  • Example

The mongocli iam team user delete command deletes one user from a team in the specified organization using the specified profile.

You must have the Organization Owner role to run this command.

mongocli iam team user delete <user-ID>
--teamId <team-ID>
--orgId <organization-ID>
[ --force ]
[ --profile|-P <profile-name> ]

Note

Use -h or --help to view the command-line help for this command.

Argument
Type
Description
Required?
<user-ID>
string
User ID to delete from the specified team.
yes
Option
Type
Description
Required?
--teamId
string
Unique identifier of the team to which you want to add users.
yes
--orgId
string
Unique identifier of the organization that contains the team.
yes
--force
Flag that indicates that the user can be deleted without requiring confirmation.
no
--profile, -P
string
Name of the profile that contains the access information. If omitted, uses the default profile.
no

The command prints following output to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

User '<user-ID>' deleted from the team

The following command deletes a user from a Atlas organization. It uses the default profile for accessing Atlas.

mongocli iam team user delete 5dd58c647a3e5a6c5bce46c7 --force \
--teamId 5f6a5c6c713184005d72fe6e --orgId 5df27c15f10fab55fc6c1234

The previous command prints the following in the default format to the terminal.

User '5dd58c647a3e5a6c5bce46c7' deleted from the team

Back

Add a Team User