返回组织的所有用户。
要使用此命令,您必须使用具有“组织成员”角色的用户帐户或 API 密钥进行身份验证。
语法
命令语法
mongocli iam organizations users list [options] 
选项
名称  | 类型  | 必需  | 说明  | 
|---|---|---|---|
-h,--help  | false  | 列表帮助  | |
--limit  | int  | false  | 每个结果页面的列项数,最多 500 个。 如果结果超过 500 个,请指定 --page 选项以更改结果页面。 此值默认为 100。  | 
--orgId  | 字符串  | false  | 要使用的组织 ID。 此选项会覆盖配置文件或环境变量中的设置。  | 
-o, --output  | 字符串  | false  | 输出格式。 有效值为 json、json-path、go-template 或 go-template-file。 要查看完整输出,请使用 -o json 选项。  | 
--page  | int  | false  | 指定结果页面的页码。 该值默认为 1。  | 
继承选项
名称  | 类型  | 必需  | 说明  | 
|---|---|---|---|
-P, --profile  | 字符串  | false  | 要从您的配置文件中使用的配置文件的名称。要学习;了解MongoCLI 的配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-configuration-file。  | 
输出
如果命令成功,CLI 将返回类似于以下示例的输出。 括号中的值代表您的价值观。
ID     FIRST NAME    LAST NAME    USERNAME <ID>   <FirstName>   <LastName>   <Username> 
示例
# Return a JSON-formatted list of all users for the organization with the ID 5e2211c17a3e5a48f5497de3: mongocli organizations users list --orgId 5e2211c17a3e5a48f5497de3 --output json