mongocli iam projects users delete
The mongocli iam projects users delete
command deletes a user
in the MongoDB service project. You can also delete users in your
MongoDB service project using the:
Permissions Required
The following table shows the role you must have to delete a user from the MongoDB service project.
MongoDB Service | Role |
---|---|
Atlas | |
Cloud Manager | |
Ops Manager |
Syntax
mongocli iam projects users delete <user-id> [ --force ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Arguments
Argument | Type | Description | Required? |
---|---|---|---|
<user-id> | string | Unique identifier of the user you want to delete from the project.
You can run the mongocli iam projects users list command to retrieve
the user's ID. | yes |
Options
Option | Type | Description | Required? |
---|---|---|---|
--force | Flag that indicates that the project-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 |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Output
The command prints the 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 project
Example
The following command deletes a user with ID 5e44445ef10fab20b49c0f31
in an Atlas project. It uses the default profile for accessing
Atlas.
mongocli iam projects users delete 5e44445ef10fab20b49c0f31 --force
The previous command prints the following to the terminal.
User '5e44445ef10fab20b49c0f31' deleted from the project