Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Completed
Categories Atlas
Created by Guest
Created on Feb 6, 2023

Add a datasource for members of an organization

Problem: The `mongodbatlas_teams` resource only works with email addresses of user accounts which are existing members of the organization at apply time¹, and Team memberships can't (yet?) be managed via Identity Federation (third-party SAML IdP). Solution: If there was a datasource using the "Get All Organization Users" API² to return a list of organization members, that data could be used to filter the `usernames` input attribute of the `mongodbatlas_teams` resource to only add valid users. Workaround: We're using a Python script as an external datasource to get the data needed to perform said filtering. ¹: An error is thrown when trying to add a user who hasn't logged into Atlas or isn't part of the organization: `401 (request "NOT_USER_ADMIN") The currently logged in user does not have the user administrator role for any group, team, or organization containing user.` ²: https://www.mongodb.com/docs/atlas/reference/api/organization-users-get-all-users/#get-all-organization-users
  • ADMIN RESPONSE
    Aug 1, 2025
    this feature has has been released as part of v1.10.0 release. thank you for the feedback. for more details see: https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/organizations ( https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/organizations )
  • Attach files
  • Guest
    Mar 29, 2023
    Thanks for sharing feedback Thorben. We have added this to our v1.9.0 sprint cycle and you should see support for a new "Get All Organization Users" data source then (likely 1-2 months away). Hope this helps