I use Powershell for API calls and data analysis. Code below will fetch all devices (with all available fields) from a particular network and store them as array variable $data. You can dump them as .csv with something like this: $data | Export-CSV "c:\mdm.csv" -NoTypeInformation
# Meraki API key
$api_key = 'your_key'
# Ensures that Invoke-WebRequest uses TLS 1.2 otherwise request will fail
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$network_id = 'N_0000' #MDM network ID
$organizationID = '00000'
$header = @{
"X-Cisco-Meraki-API-Key" = $api_key
"Content-Type" = 'application/json'
}
$api = @{
"endpoint" = 'https://dashboard.meraki.com/api/v0'
}
$api.url = '/networks/' + $network_id + '/sm/devices?fields='
$api.param = 'ip,systemType,availableDeviceCapacity,kioskAppName,biosVersion,lastConnected,missingAppsCount,userSuppliedAddress,location,lastUser,publicIp,phoneNumber,diskInfoJson,deviceCapacity,isManaged,hadMdm,isSupervised,meid,imei,iccid,simCarrierNetwork,cellularDataUsed,isHotspotEnabled,createdAt,batteryEstCharge,quarantined,avName,avRunning,asName,fwName,isRooted,loginRequired,screenLockEnabled,screenLockDelay,autoLoginDisabled,hasMdm,hasDesktopAgent,diskEncryptionEnabled,hardwareEncryptionCaps,passCodeLock'
$api.scope = $Null # 'Change to '&scope=withAny,your_tag' to fetch devices with specific tag'
$uri = $api.endpoint + $api.url + $api.param + $api.scope
$data = @((Invoke-RestMethod -Method GET -Uri $uri -Headers $header).devices)