--- page_title: "ona_users Data Source - ona" subcategory: "Identity and Access" description: |- Lists Ona users visible to the configured token in its organization. Suspended or departed users can require organization-admin access. --- # ona_users (Data Source) Lists Ona users visible to the configured token in its organization. Suspended or departed users can require organization-admin access. For product context, see [Organization roles](https://ona.com/docs/ona/organizations/organization-roles). ## Example Usage ```terraform data "ona_users" "active_members" { search = "example.com" statuses = ["active"] roles = ["member"] } locals { active_members_by_id = { for user in data.ona_users.active_members.users : user.user_id => user } } ``` ## Schema ### Optional - `roles` (Set of String) Organization roles to include. Supported values are `admin` and `member`. - `search` (String) Case-insensitive substring search over user names and email addresses. A UUID search matches that user ID exactly. Blank input is ignored. - `statuses` (Set of String) User statuses to include. Supported values are `active`, `suspended`, and `left`. - `user_ids` (Set of String) UUIDs of users to include. The Ona API accepts at most 25 values. ### Read-Only - `users` (Attributes List) Matching users sorted by user ID for deterministic Terraform state. (see [below for nested schema](#nestedatt--users)) ### Nested Schema for `users` Read-Only: - `email` (String) User email address, or null when unavailable. - `id` (String) Terraform data source ID. This is the same value as `user_id`. - `login_provider` (String) Login provider reported for the user, or null when unavailable. - `member_since` (String) Time the backend user record was created, formatted as RFC 3339. This may not be the most recent rejoin time. - `name` (String) User display name. - `role` (String) Organization role: `admin` or `member`. - `status` (String) User status: `active`, `suspended`, or `left`. - `user_id` (String) Stable UUID of the Ona user.