Automatically tag Meraki System Manager (SM) devices based on cellular capabilities using the Meraki Dashboard API.
- Detects if a device has cellular capability (IMEI, ICCID, SIM carrier, phone number)
- Tags devices with customizable cellular or Wi-Fi only tags
- Optionally removes incorrect or outdated tags
- Supports chunked API calls to meet Meraki limits
- Outputs readable logs to both console and file (
auto_tag.log)
For each SM device in the specified network:
- If any cellular identifiers are present, it is tagged with the cellular tag
- If not, it is tagged with the Wi-Fi-only tag
- If
--remove-wrongis set, it will also remove any incorrect tags
- Python 3.7+
meraki,python-dotenv, andrichpackages
Install dependencies:
pip install -r requirements.txt- Create a
.envfile in the same folder as the script:
MERAKI_DASHBOARD_API_KEY=your_api_key_here
python sm_device_tagging.py \
--org-name "My Organization" \
--network-name "My SM Network" \
--cellular-tag "Store_iPad" \
--wifi-tag "Curbside_iPad" \
--remove-wrong| Argument | Description |
|---|---|
--org-name |
Meraki organization name |
--network-name |
Name of the SM network to tag devices in |
--cellular-tag |
(Optional) Tag for cellular-capable devices (default: Store_iPad) |
--wifi-tag |
(Optional) Tag for Wi-Fi-only devices (default: Curbside_iPad) |
--remove-wrong |
(Optional) If set, removes incorrect tags |
- Logs actions to the console using Rich formatting
- Saves detailed log file as
auto_tag.log - Prints final summary including how many devices were tagged or untagged

