# List all users with a given email domain

**URL:** <https://meta.discourse.org/t/list-all-users-with-a-given-email-domain/323707>\
**Category:** Support\
**Created:** [August 28, 2024, 1:44am UTC](https://meta.discourse.org/t/list-all-users-with-a-given-email-domain/323707 "2024-08-28T01:44:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [August 28, 2024, 6:00am UTC](https://meta.discourse.org/t/list-all-users-with-a-given-email-domain/323707/5 "2024-08-28T06:00:58Z")

</div>

You can see them in the Bounced email report at `yoursite/admin/email/bounced`

Or you can use [data explorer](https://meta.discourse.org/t/32566?silent=true) for finding all users of a domain, then export a csv file. maybe something like:

```sql
-- [params]
-- text :domain = example.com

SELECT u.id AS user_id, u.username, ue.email
FROM users u
JOIN user_emails ue ON u.id = ue.user_id
WHERE ue.email LIKE '%' || :domain
  AND ue.primary = true
ORDER BY u.username

```

Or you could make a group and automatically add them to the group

 ![Screenshot 2024-08-27 at 10.59.18 PM](https://global.discourse-cdn.com/meta/original/4X/e/e/8/ee8f5a7e3067b3b384290d69c99fb0755010d440.png)

---

_[View the full topic](https://meta.discourse.org/t/list-all-users-with-a-given-email-domain/323707)._
