# Active Users per Database connection

**URL:** <https://community.auth0.com/t/active-users-per-database-connection/61744>\
**Category:** Get Help\
**Tags:** active-users, reports, database-connections\
**Created:** [April 26, 2021, 3:09pm UTC](https://community.auth0.com/t/active-users-per-database-connection/61744 "2021-04-26T15:09:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose.alvarez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jose.alvarez/32/12921_2.png) [@jose.alvarez](https://community.auth0.com/u/jose.alvarez)\
**Post date:** [April 26, 2021, 3:09pm UTC](https://community.auth0.com/t/active-users-per-database-connection/61744/1 "2021-04-26T15:09:56Z")

</div>

Hello,

I am trying to find a way to know how many active users do i have monthly per database connection. Right now i am NOT using a custom database. Would like to understand if there is a way to get this sort of report or if i need to do it myself, how would be the best way to do it.

Thank you!

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 26, 2021, 3:30pm UTC](https://community.auth0.com/t/active-users-per-database-connection/61744/3 "2021-04-26T15:30:42Z")

</div>

Hi @jose.alvarez,

Welcome to the Community!

Unfortunately, the Management API’s [GET](https://auth0.com/docs/api/management/v2?_ga=2.246162692.1847387816.1618225160-1595415333.1607347674#!/Stats/get_active_users)[/api/v2/stats/active-users](https://auth0.com/docs/api/management/v2?_ga=2.246162692.1847387816.1618225160-1595415333.1607347674#!/Stats/get_active_users) endpoint does not allow you to query by connection. However, you can use the [GET](https://auth0.com/docs/api/management/v2?_ga=2.246162692.1847387816.1618225160-1595415333.1607347674#!/Users/get_users)[/api/v2/users](https://auth0.com/docs/api/management/v2?_ga=2.246162692.1847387816.1618225160-1595415333.1607347674#!/Users/get_users) endpoint with the `connection` query parameter to find this data:

```auto
https://YOUR_DOMAIN/api/v2/users?connection=YOUR_CONNECTION_NAME&search_engine=v3&include_totals=true

```

You can then filter the returned list of users to see how many of the users have logged in during the last 30 days.

To make Management API requests, you’ll need to retrieve an Access Token, which you can read about here: [Management API Access Tokens](https://auth0.com/docs/tokens/management-api-access-tokens)

---

<div class="post-metadata">

**Author:** ![jose.alvarez](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jose.alvarez/32/12921_2.png) [@jose.alvarez](https://community.auth0.com/u/jose.alvarez)\
**Post date:** [April 26, 2021, 3:35pm UTC](https://community.auth0.com/t/active-users-per-database-connection/61744/4 "2021-04-26T15:35:32Z")

</div>

Thanks for the quick and accurate response, Stephanie!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 11, 2021, 3:36pm UTC](https://community.auth0.com/t/active-users-per-database-connection/61744/5 "2021-05-11T15:36:00Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
