Client Search in whole ORG

seroal22
Here to help

Client Search in whole ORG

Hi,

 

the ORG Wide Client search requires a mac address as attribute and furthermore it is quite restricted.

 

I want to find clients with specific attributes, in my case specific os and I want to search org wide. As this ORG CLients search is limited, is the way to go by using network wide search? =https://developer.cisco.com/meraki/api-v1/get-network-clients/

 

Are there already tools/scripts, where I can query all networks for such specific client attributes by providing a ORG ID ? Or do UI have to build a custom script, where I import all the network IDs and let the tool query all the networks?

 

What is the prefered way to get a simple list on the end?

 

Thanks!

2 Replies 2
AxL1971
Building a reputation

I have written an application that pulls down devices connected access points across all the offices(networks) in our organisation, use the device name and mac address as unique identified for that user.

 

This is written back to an SQL database then we cross reference this with another SQL table to find out the name  of the user. This is used to see how busy an office is.

 

 

This is the API call I make and then parse the data 

 

https://api.meraki.com/api/v1/networks/<networkID>/clients?timespan=300&recentDeviceConnections[]=Wireless&statuses[]=Online&perPage=2000

 

The respone back will have a OS for the operating system of the device (example below)

 

"os":"Windows 10",

 

Example of the data we collect from the above API call (this is from the SQL table)

 

AxL1971_1-1739532846390.png

 

 

We can 2 SSID a corporoate WLAN and a Guest Network 

NJNetworkGuy100
Getting noticed

Yeah, wish they had an org-wide search feature...would make things MUCH easier to just export the entire client list for the entire Org to a spreadsheet and then use Excel's filtering to quickly find what you need.  

 

Maybe someone has developed something here using the API's:  Cisco Networking App Marketplace | Cisco

 

I ended up building my own Python script a few years ago when I was asked to find all non-Windows 10 machines that might be on our networks.  Just built up some variables for the custom search function I built, using Input() on some console stuff on what you are searching for and what value to search for (OS, VLAN, Manufacturer, a few others). 

 

I picked a timeframe based on days (1 to 31) and then ran through all the networks in the Org.  While looping through the networks, I ran the API for pulling all the clients in that network, ran a small custom function that searched through all the network clients, and returned a list of clients that met that search match.  It all gets exported out to an Excel workbook using Openpyxl functions that I created (and pretty much reuse in all my output scripts).  

 

List comprehension helped speed things up greatly when doing the search and shrinking the list of clients down to just what you are looking for.  

Get notified when there are additional replies to this discussion.