mongocli iam users delete
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoCLI.
The mongocli iam users delete
command deletes an Ops Manager user
with the specified user ID. You can also delete a user from Ops Manager
using the API.
Syntax
mongocli iam users delete|rm <user-id> [ --force ] [ --profile|-P <profile-name> ]
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. | yes |
Options
Option | Type | Description | Required? |
---|---|---|---|
--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 |
Output
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
Example
The following command deletes a user with ID 5e44445ef10fab20b49c0f31
in an Ops Manager organization. It uses the default profile for accessing
Ops Manager.
mongocli iam user delete 5e44445ef10fab20b49c0f31 --force
The previous command prints the following to the terminal.
User '5e44445ef10fab20b49c0f31' deleted