Skip to content

Commit 24f4045

Browse files
DOCSP-12059 doc for iam orgs users list command (#249)
* DOCSP-12059 doc for iam orgs users list command * Update source/reference/iam/iam-org-user-list.txt Co-authored-by: jwilliams-mongo <[email protected]> * DOCSP-12059 fixing TOC order Co-authored-by: jwilliams-mongo <[email protected]>
1 parent 047bcfe commit 24f4045

File tree

2 files changed

+214
-0
lines changed

2 files changed

+214
-0
lines changed
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
.. _iam-org-user-list:
2+
3+
============================
4+
mongocli iam orgs users list
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 orgs users list`` command lists users in your
16+
MongoDB service organization. You can also list the users in
17+
your MongoDB service organization using the:
18+
19+
- |service| :atlas:`UI </access/manage-org-users/#view-active-users-and-outgoing-invitations-in-an-organization>` or
20+
:atlas:`API </reference/api/organization-users-get-all-users/>`
21+
- |cloud-short| :cloudmgr:`UI </tutorial/manage-users/#view-active-users-and-pending-invitations-in-an-organization>`
22+
or :cloudmgr:`API </reference/api/organizations/organization-get-all-users/>`
23+
- |onprem| :opsmgr:`UI </tutorial/manage-users/#view-active-users-and-pending-invitations-in-an-organization>`
24+
or :opsmgr:`API </reference/api/organizations/organization-get-all-users/>`
25+
26+
.. _mcli-iam-org-user-list-cmd-permissions:
27+
28+
Permissions Required
29+
--------------------
30+
31+
The following table lists the roles you must have to retrieve the
32+
users in your MongoDB service organization.
33+
34+
.. list-table::
35+
:header-rows: 1
36+
:widths: 40 60
37+
38+
* - MongoDB Service
39+
- Role
40+
41+
* - |service|
42+
- :atlas:`Organization Owner </reference/user-roles/#Organization-Owner>`
43+
44+
* - |cloud-short|
45+
- :cloudmgr:`Organization Owner
46+
</reference/user-roles/#Organization-Owner>`
47+
48+
* - |onprem|
49+
- :opsmgr:`Organization Owner </reference/user-roles/#Organization-Owner>`
50+
51+
.. _mcli-iam-org-user-list-syntax:
52+
53+
Syntax
54+
------
55+
56+
.. code-block:: text
57+
58+
mongocli iam orgs users list
59+
[ --limit <integer> ]
60+
[ --orgId <organization-ID> ]
61+
[ --output|-o <output-format> ]
62+
[ --page <integer> ]
63+
[ --profile|-P <profile-name> ]
64+
65+
.. include:: /includes/fact-command-line-help.rst
66+
67+
.. _mcli-iam-org-user-list-options:
68+
69+
Options
70+
-------
71+
72+
.. list-table::
73+
:header-rows: 1
74+
:widths: 20 10 60 10
75+
76+
* - Option
77+
- Type
78+
- Description
79+
- Required?
80+
81+
* - ``--limit``
82+
- integer
83+
- Number of projects to return from the result set.
84+
85+
- If omitted, returns all projects.
86+
- If this value exceeds the number of projects, ``mongocli``
87+
returns all projects.
88+
- no
89+
90+
* - ``--orgId``
91+
- string
92+
- Unique identifier of the organization for which you want to
93+
retrieve the users. If omitted, uses the specified profile
94+
to access the MongoDB service organization.
95+
- no
96+
97+
* - ``--output``, ``-o``
98+
- string
99+
- .. include:: /includes/extracts/fact-basic-options-output.rst
100+
- no
101+
102+
* - ``--page``
103+
- integer
104+
- Starting chunk of projects to return from the result set. The
105+
``--limit`` flag sets the number of projects per page.
106+
107+
- If omitted, returns the first page.
108+
- If this value exceeds the number of pages, ``mongocli``
109+
returns the last page.
110+
- no
111+
112+
* - ``--profile``, ``-P``
113+
- string
114+
- Name of the profile that contains the access information. If
115+
omitted, uses the {+default-profile+}.
116+
- no
117+
118+
.. _mcli-iam-org-user-list-output:
119+
120+
Output
121+
------
122+
123+
The command prints the following output to the terminal if the command
124+
succeeds. If the command returns errors, see :ref:`Troubleshooting
125+
<troubleshooting>` for recommended solutions.
126+
127+
.. code-block:: none
128+
:copyable: false
129+
130+
ID FIRST NAME LAST NAME USERNAME
131+
<user-ID> <first-name> <last-name> <username>
132+
133+
The above default output is a subset of the fields returned by this command. For the complete list of |json| fields returned by the command, see the |api| reference for your MongoDB service:
134+
135+
- :atlas:`Atlas
136+
</reference/api/organization-users-get-all-users/#response-elements>`
137+
- :cloudmgr:`Cloud Manager
138+
</reference/api/organizations/organization-get-all-users/#response-elements>`
139+
- :opsmgr:`Ops Manager
140+
</reference/api/organizations/organization-get-all-users/#response-elements>`
141+
142+
.. _mcli-iam-org-user-list-examples:
143+
144+
Example
145+
-------
146+
147+
.. tabs::
148+
149+
.. tab:: Default
150+
:tabid: default
151+
152+
The following command lists the users in the specified |onprem|
153+
organization. It uses the {+default-profile+} for accessing |onprem|.
154+
155+
.. code-block:: text
156+
157+
mongocli iam orgs users list --orgId 5df27c15f10fab55fc6c1234
158+
159+
The previous command prints the following in the default format to
160+
the terminal. For more information on these fields, see
161+
:ref:`Output <mcli-iam-org-user-list-output>`.
162+
163+
.. code-block:: json
164+
:copyable: false
165+
166+
ID FIRST NAME LAST NAME USERNAME
167+
5f6e2c02a2dcef512bf0f169 John Doe [email protected]
168+
169+
.. tab:: JSON
170+
:tabid: json
171+
172+
The following command lists the users in an |service| organization. It
173+
uses the profile named ``atlasProfile`` for accessing |service|.
174+
175+
.. code-block:: text
176+
177+
mongocli iam orgs users list --profile atlasProfile --output json
178+
179+
The previous command prints the following in the specified format to
180+
the terminal. For more information on these fields, see
181+
:ref:`Output <mcli-iam-org-user-list-output>`.
182+
183+
.. code-block:: json
184+
:copyable: false
185+
186+
{
187+
"links": [
188+
{
189+
"rel": "self",
190+
"href": "http://cloud.mongodb.com/api/public/atlas/v1.0/orgs/5f6e2caba2dcef512bf0f32d/users?pageNum=1\u0026itemsPerPage=100"
191+
}
192+
],
193+
"results": [
194+
{
195+
"id": "5f6e2c02a2dcef512bf0f169",
196+
"emailAddress": "[email protected]",
197+
"firstName": "John",
198+
"lastName": "Doe",
199+
"roles": [
200+
{
201+
"groupId": "5e399b9a7a3e5a1772948493",
202+
"roleName": "GROUP_OWNER"
203+
},
204+
{
205+
"orgId": "5dd6fa0c7a3e5a1d0fa27e35",
206+
"roleName": "ORG_OWNER"
207+
}
208+
],
209+
"username": "[email protected]"
210+
}
211+
],
212+
"totalCount": 1
213+
}

source/reference/iam/user-commands.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ User Commands
1616
:titlesonly:
1717

1818
Create One User <iam-user-invite>
19+
List Organization Users <iam-org-user-list>
1920
List Project Users <iam-project-user-list>
2021
Describe a User <iam-user-describe>
2122
Delete One Ops Manager User <iam-user-delete>

0 commit comments

Comments
 (0)