Navigation

mongocli iam project team list

The mongocli iam project team list command lists teams with access to the specified project using the specified profile.

mongocli iam project|s team|s list|ls
[ --projectId <project-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?
--projectId
string
Unique identifier of the project for which to list teams with access. If omitted, uses the project ID in your profile or environment variable.
no
--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 the 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 the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.

ID
5f6a61ad7840ac2890424ce2
5f6a5c924166e52c48b212f3

The following command lists teams with access to an Atlas project. It specifies a project and uses the default profile for accessing Atlas.

mongocli iam team list --projectId 5dd6faab74979f10f39ffb78 -o json

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

{
"links": [...],
"roleNames": [
"GROUP_READ_ONLY"
],
"teamId": "5f6a61ad7840ac2890424ce2",
},
{
"links": [...],
"roleNames": [
"GROUP_CLUSTER_MANAGER",
"GROUP_DATA_ACCESS_ADMIN"
],
"teamId": "5f6a5c924166e52c48b212f3",
}
Give Feedback