MDM: iOS device types

MFuchs
Here to help

MDM: iOS device types

Hi !

 

I need to separate iOS devices by iPhones and iPads.

Until now i did that by tagging iPads manually.

So i would need to tag iPhones manually, too.

 

The goal is to roll out apps only for iPhones or ony for iPads.

 

How do others do this ?

 

Sadly there is no functionality to filter from devicetype like iPad or iPhone, although meraki mdm knows about this device type in the dashboard (model field).

3 Replies 3
BlakeRichardson
Kind of a big deal
Kind of a big deal

@MFuchs  We tag our devices the same way i.e. iPad, iPhone, Laptop etc. As far as I am aware there isn't any form of auto-tagging this it just part of the process of setting up a device. 

 

Meraki breaks down the devices types as shown below but doesn't get anymore granular than that.

 

Screen Shot 2019-09-03 at 8.23.51 AM.png

If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.
T1
Building a reputation

You could do it via API and a simple script.

1. Fetch a list of devices.
2. Filter out iPads/iPhones that don't have a tag you want.
3. Assign tag(s).

Something like below. It's written in powershell but requires curl to make API calls. One of my early scripts, still works so I never bothered rewriting in pure powershell.

# Curl
$curl = "c:\curl\bin\curl.exe"

# Meraki API headers
$api_key = 'X-Cisco-Meraki-API-KEY: XXXXXXXXXXXXXXXX'
$content_type = 'Content-Type: application/json'

# MDM network id
$network_id = 'XXXXXXXXXXXXXX'

# Log file
$log = 'C:\Scripts\Scheduled Tasks\Tag_assignment_log.csv'

###### Fetch the list of devicess ########
$uri = "https://dashboard.meraki.com/api/v0/networks/$network_id/sm/devices?fields=ip,systemType,lastConnect..."
$list = (@((& $curl -L -H $api_key -X GET -H $content_type $uri) | ConvertFrom-Json)).devices

# Filter iPhones without my_iPhone_tag tag
$iphones = @($list | where {$_.systemModel -match "iPhone" -and $_.tags -notcontains "my_iPhone_tag"})


# Add missing my_iPhone_tag tag
foreach ($iphone in $iphones) {
$binary = '{"ids":"' + $iphone.id + '", "updateAction":"add", "tags":"my_iPhone_tag"}' | ConvertTo-Json
$uri = "https://api.meraki.com/api/v0/networks/$network_id/sm/devices/tags"
& $curl -L -H $api_key -X PUT -H $content_type --data-binary $binary $uri >> $log
}

MFuchs
Here to help

Hi !

Thanks your quick replies to my question !

I'm stuck in a datacenter move, so I'll try this afterwards.

But that's exactly the right idea for what I'm trying to achieve, so thank you very much in advance !

 

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.
Labels