Returns details about the pending and active MongoDB Cloud users associated with the specified team in the organization. Teams enable you to grant project access roles to MongoDB Cloud users.
Note: This resource cannot be used to view details about users invited via the deprecated Invite One MongoDB Cloud User to Join One Project endpoint.
Note: To return both pending and active users, use v2-{2025-02-19} or later. If using a deprecated version, only active users will be returned.
- Organization Member
Path parameters
-
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the
/orgsendpoint to retrieve all organizations to which the authenticated user has access.Format should match the following pattern:
^([a-f0-9]{24})$. -
Unique 24-hexadecimal digit string that identifies the team whose application users you want to return.
Format should match the following pattern:
^([a-f0-9]{24})$.
Query parameters
-
Flag that indicates whether Application wraps the response in an
envelopeJSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.Default value is
false. -
Number of items that the response returns per page.
Minimum value is
1, maximum value is500. Default value is100. -
Number of the page that displays the current set of the total objects that the response returns.
Minimum value is
1. Default value is1. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false.Prettyprint -
Email address to filter users by. Not supported in deprecated versions.
-
Deprecated: Use
orgMembershipStatusesinstead. Organization membership status to filter users by. Allowed values:ACTIVE,PENDING,INVITATION_EXPIRED,INVITATION_REJECTED. If you exclude this parameter, this resource returns ACTIVE and PENDING users. Not supported in deprecated versions. -
Organization membership status to filter users by. You can supply this parameter multiple times. Allowed values:
ACTIVE,PENDING,INVITATION_EXPIRED,INVITATION_REJECTED. Replaces the deprecatedorgMembershipStatusparameter. If you exclude this parameter, this resource returns ACTIVE and PENDING users. Cannot be combined withorgMembershipStatus. Not supported in deprecated versions.Not more than
4elements. Values arePENDING,ACTIVE,INVITATION_EXPIRED, orINVITATION_REJECTED. -
Unique 24-hexadecimal digit string to filter users by. Not supported in deprecated versions.
Format should match the following pattern:
^([a-f0-9]{24})$.
atlas api mongoDbCloudUsers listTeamUsers --help
import (
"os"
"context"
"log"
sdk "go.mongodb.org/atlas-sdk/v20231001001/admin"
)
func main() {
ctx := context.Background()
clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")
// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))
if err != nil {
log.Fatalf("Error: %v", err)
}
params = &sdk.ListOrgTeamUsersApiParams{}
sdkResp, httpResp, err := client.MongoDBCloudUsersApi.
ListOrgTeamUsersWithParams(ctx, params).
Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.2023-10-01+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/teams/{teamId}/users?pretty=true"
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest --include \
--header "Accept: application/vnd.atlas.2023-10-01+json" \
-X GET "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/teams/{teamId}/users?pretty=true"
# Headers
# Payload
{
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"results": [
{
"country": "string",
"createdAt": "2026-05-04T09:42:00Z",
"emailAddress": "hello@example.com",
"firstName": "string",
"id": "32b6e34b3d91647abb20e7b8",
"lastAuth": "2026-05-04T09:42:00Z",
"lastName": "string",
"links": [
{
"href": "https://cloud.mongodb.com/api/atlas",
"rel": "self"
}
],
"mobileNumber": "string",
"password": "string",
"roles": [
{
"groupId": "32b6e34b3d91647abb20e7b8",
"orgId": "32b6e34b3d91647abb20e7b8",
"roleName": "string"
}
],
"teamIds": [
"32b6e34b3d91647abb20e7b8"
],
"username": "hello@example.com"
}
],
"totalCount": 42
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"error": 400,
"errorCode": "VALIDATION_ERROR",
"reason": "Bad Request"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 401,
"errorCode": "NOT_ORG_GROUP_CREATOR",
"reason": "Unauthorized"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 403,
"errorCode": "CANNOT_CHANGE_GROUP_NAME",
"reason": "Forbidden"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"error": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"reason": "Not Found"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot delete organization link while there is active migration in following project ids: 60c4fd418ebe251047c50554",
"error": 409,
"errorCode": "CANNOT_DELETE_ORG_ACTIVE_LIVE_MIGRATION_ATLAS_ORG_LINK",
"reason": "Conflict"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 429,
"errorCode": "RATE_LIMITED",
"reason": "Too Many Requests"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 500,
"errorCode": "UNEXPECTED_ERROR",
"reason": "Internal Server Error"
}