# User activity report API returning the same results for 'active' and 'inactive'

**URL:** <https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051>\
**Category:** API and Webhooks\
**Created:** [October 22, 2020, 5:57pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051 "2020-10-22T17:57:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![garrett](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/garrett/32/13346_2.png) [@garrett](https://devforum.zoom.us/u/garrett)\
**Post date:** [October 22, 2020, 5:57pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/1 "2020-10-22T17:57:31Z")

</div>

**Description**  
The ‘/report/users’ API is returning the same results for me regardless of whether i specify ‘active’ or ‘inactive’ for the status query parameter for a given timeframe. The same number of objects is returned and the email addresses in each result set are the same.

**Error**  
No error message, but incorrect results

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
Powershell using JWT authentication

**Which Endpoint/s?**  
[https://api.zoom.us/v2/report/users](https://api.zoom.us/v2/report/users)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
Initialize request as below:

```
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add('content-type' , 'application/json')
$headers.Add('authorization', '') # Token will be generated before each query

$baseUri = 'https://api.zoom.us/v2'
$usersUri = $baseUri + '/report/users'
$request = [System.UriBuilder]$usersUri

$query = [System.Web.HttpUtility]::ParseQueryString([String]::Empty)
$query.Add('status', 'active')
$query.Add('page_size', 300)
$query.Add('page_number', 1)
$query.Add('from', '')
$query.Add('to', '')
$start = 3
$end = 2

```

See verbose output of query requests for URIs used and results returned (i’ve truncated the results but they’re all the same except the page number)

```
VERBOSE: GET https://api.zoom.us/v2/report/users?status=active&page_size=300&page_number=1&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 1 of 16, 4642 results
VERBOSE: GET https://api.zoom.us/v2/report/users?status=active&page_size=300&page_number=2&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 2 of 16, 4642 results
...
VERBOSE: GET https://api.zoom.us/v2/report/users?status=active&page_size=300&page_number=16&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 16 of 16, 4642 results

[13:46:34]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> $active = $statsForRange.email 

[13:46:50]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> $active.count

```

Update the query as shown and rerun, results are the same and compare-object between the two results shows no difference.

```
[13:41:12]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> $query['status'] = 'inactive'

and execute again with the results shown (note the query is correctly showing status=inactive this time)

Pulling Idle Stats from '2020-10-19' to '2020-10-20''
VERBOSE: GET https://api.zoom.us/v2/report/users?status=inactive&page_size=300&page_number=1&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 1 of 16, 4642 results
VERBOSE: GET https://api.zoom.us/v2/report/users?status=inactive&page_size=300&page_number=2&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 2 of 16, 4642 results
...
VERBOSE: GET https://api.zoom.us/v2/report/users?status=inactive&page_size=300&page_number=16&from=2020-10-19&to=2020-10-20 with 0-byte payload
VERBOSE: received -1-byte response of content type application/json;charset=UTF-8
VERBOSE: Pulled page 16 of 16, 4642 results
[13:48:07]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> $inactive = $statsForRange.email

[13:48:20]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> $inactive.count

4642
[13:48:23]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers> Compare-object $active $inactive
  << Note that compare-object will return differences between the two lists, so no results means the objects are the same >>
[13:48:27]:C:\Scripts\PowerShell\zoom\Scripts\Manage-DisabledUsers>

```

**Screenshots (If applicable)**  
If applicable, add screenshots to help explain your problem.

**Additional context**  
Add any other context about the problem here.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 23, 2020, 2:18pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/2 "2020-10-23T14:18:09Z")

</div>

Hey @garrett,

It looks like you’re using a `status` query parameter instead of the `type` parameter in our documentation:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/1/1/119ffe604a2a0b6a7d70dc91b75e7b936a347d4d.png)

Can you please change this to `type=active`/`type=inactive` and let me know if you still see any issues?

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![garrett](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/garrett/32/13346_2.png) [@garrett](https://devforum.zoom.us/u/garrett)\
**Post date:** [October 23, 2020, 4:30pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/3 "2020-10-23T16:30:40Z")

</div>

Thanks Will,  
No idea how i managed to mess that up.

I updated the query to use the “type” parameter and i am getting different results, but I’m still seeing an issue. If I’m understanding the report correctly for a given timeframe shouldn’t every user on the account show up as either inactive or active? I’m pulling an ‘active’ report and then an ‘inactive’ report and the total results from both reports is about 100 users off from the total users in our account. we definitely haven’t added 100 new users in the past two days either, so I’m curious what’s going on with the users that aren’t on either report. Any idea what would cause a user to not show up on either?

Also one other question regarding the “from” and “to” properties.

if i do from: ‘2020-10-20’ to ‘2020-10-21’ does that include everything from 2020-10-20 00:00:00 to 2020-10-21 23:59:59 , or would it only be from 2020-10-20 00:00:00 to 2020-10-21 00:00:00? Want to make sure I’m understanding correctly what ranges I’m pulling.

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 26, 2020, 4:47pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/4 "2020-10-26T16:47:19Z")

</div>

Hey @garrett,

Can you share the request URLs you’re using for those two reports? I’m happy to take a closer look at why this might differ from the total users in your account.

In regards to the date, I believe that ‘2020-10-20’ to ‘2020-10-21’ includes everything from 2020-10-20 00:00:00 to 2020-10-21 23:59:59.

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![garrett](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/garrett/32/13346_2.png) [@garrett](https://devforum.zoom.us/u/garrett)\
**Post date:** [October 26, 2020, 7:49pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/5 "2020-10-26T19:49:26Z")

</div>

Hey Will,  
I figured it out. The difference appears to be coming from the zoom rooms that are on our account. When we query the user list using the ‘[https://api.zoom.us/v2/users/](https://api.zoom.us/v2/users/)’ api it doesn’t include the zoom room users that are on our account in the results. However those users are included in the active/inactive report. Once i exclude users that start with ‘rooms\_’ from the results the numbers match.

Maybe it would make sense to have a query parameter to include / exclude room accounts?

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [October 28, 2020, 3:16pm UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/6 "2020-10-28T15:16:53Z")

</div>

Hey @garrett,

Aha! I’m glad you were able to figure it out, and thanks for sharing—I’m sure others will find this thread helpful in the future.

In regards to adding a query parameter, this is a great idea. I’ll be happy to share this feedback with our team internally. If you’re so inclined, you might also consider adding this as a feature request here as well: #feature-requests

Thanks,  
Will

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [November 28, 2020, 1:17am UTC](https://devforum.zoom.us/t/user-activity-report-api-returning-the-same-results-for-active-and-inactive/34051/7 "2020-11-28T01:17:02Z")

</div>

Closed on November 28, 2020, 1:17am UTC

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