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

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

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.

Hey @garrett,

It looks like you’re using a status query parameter instead of the type parameter in our documentation:
image

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

Thanks,
Will

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.

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

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/’ 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?

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

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