|
| 1 | +.. _iam-user-delete: |
| 2 | + |
| 3 | +========================= |
| 4 | +mongocli iam users delete |
| 5 | +========================= |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +The ``mongocli iam users delete`` command deletes an |onprem| user |
| 16 | +with the specified user ID. You can also delete a user from |onprem| |
| 17 | +using the :opsmgr:`API </reference/api/users/delete-one-user/>`. |
| 18 | + |
| 19 | +.. _mcli-iam-user-delete-syntax: |
| 20 | + |
| 21 | +Syntax |
| 22 | +------ |
| 23 | + |
| 24 | +.. code-block:: text |
| 25 | + |
| 26 | + mongocli iam users delete|rm <user-id> |
| 27 | + [ --force ] |
| 28 | + [ --profile|-P <profile-name> ] |
| 29 | + |
| 30 | +.. include:: /includes/fact-command-line-help.rst |
| 31 | + |
| 32 | +Arguments |
| 33 | +--------- |
| 34 | + |
| 35 | +.. list-table:: |
| 36 | + :header-rows: 1 |
| 37 | + :widths: 20 10 60 10 |
| 38 | + |
| 39 | + * - Argument |
| 40 | + - Type |
| 41 | + - Description |
| 42 | + - Required? |
| 43 | + |
| 44 | + * - ``<user-id>`` |
| 45 | + - string |
| 46 | + - Unique identifier of the user you want to delete. |
| 47 | + - yes |
| 48 | + |
| 49 | +.. _mcli-iam-user-delete-options: |
| 50 | + |
| 51 | +Options |
| 52 | +------- |
| 53 | + |
| 54 | +.. list-table:: |
| 55 | + :header-rows: 1 |
| 56 | + :widths: 20 10 60 10 |
| 57 | + |
| 58 | + * - Option |
| 59 | + - Type |
| 60 | + - Description |
| 61 | + - Required? |
| 62 | + |
| 63 | + * - ``--force`` |
| 64 | + - |
| 65 | + - Flag that indicates that the user can be deleted without |
| 66 | + requiring confirmation. |
| 67 | + - no |
| 68 | + |
| 69 | + * - ``--profile``, ``-P`` |
| 70 | + - string |
| 71 | + - Name of the profile that contains the access information. If |
| 72 | + omitted, uses the {+default-profile+}. |
| 73 | + - no |
| 74 | + |
| 75 | +.. _mcli-iam-user-delete-output: |
| 76 | + |
| 77 | +Output |
| 78 | +------ |
| 79 | + |
| 80 | +The command prints following output to the terminal if the command succeeds. |
| 81 | +If the command returns errors, see :ref:`Troubleshooting <troubleshooting>` |
| 82 | +for recommended solutions. |
| 83 | + |
| 84 | +.. code-block:: none |
| 85 | + |
| 86 | + User '<user-id>' deleted |
| 87 | + |
| 88 | +.. _mcli-iam-user-delete-examples: |
| 89 | + |
| 90 | +Example |
| 91 | +------- |
| 92 | + |
| 93 | +The following command deletes a user with ID ``5e44445ef10fab20b49c0f31`` |
| 94 | +in an |onprem| organization. It uses the {+default-profile+} for accessing |
| 95 | +|onprem|. |
| 96 | + |
| 97 | +.. code-block:: text |
| 98 | + |
| 99 | + mongocli iam user delete 5e44445ef10fab20b49c0f31 --force |
| 100 | + |
| 101 | +The previous command prints the following to the terminal. |
| 102 | + |
| 103 | +.. code-block:: none |
| 104 | + :copyable: false |
| 105 | + |
| 106 | + User '5e44445ef10fab20b49c0f31' deleted |
0 commit comments