Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli iam team list

On this page

  • Syntax
  • Options
  • Output
  • Example

The mongocli iam team list command lists teams in the specified organization using the specified profile.

mongocli iam team list
--orgId <organization-ID>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]

Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
--orgId
string
Unique identifier of the organization that contains the team.
yes
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format

  • go-template for custom output using the Go template

  • go-template-file for custom output specified using Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile that contains the access information. If omitted, uses the default profile.
no

The command prints following output in the specified format to the terminal if the command succeeds. If the command returns errors, see Troubleshooting for recommended solutions.

ID NAME
5f6a61ad7840ac2890424ce2 team1
5f6a5c924166e52c48b212f3 team2
Field
Description
id
The unique identifier of the team.
name
The name of the team.

The following command lists teams in an Atlas organization. It uses the default profile for accessing Atlas.

mongocli iam team list --orgId 5df27c15f10fab55fc6c1234 -o json

The previous command prints the following in the specified format to the terminal. For more information on these fields, see Output.

{
"id": "5e44445ef10fab20b49c0f31",
"name": "team1",
},
{
"id": "5f6a5c924166e52c48b212f3",
"name": "team2"
}

Back

Create a Team