cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2143
Views
5
Helpful
4
Replies

Add radius server for multiple networks

rahaliix131005
Community Member

Hey Guys,

I'm struggling to add a radius server for 50+ networks , tried to work with couple of python scripts but didn't work even when I used Meraki SDK couldn't make it work .

If anyone did this before or have an idea , please help !

one of the python script I used using Meraki SDK

import meraki
import requests

# Replace with your actual Meraki API key and network ID
API_KEY = 'your_meraki_api_key'
NETWORK_ID = 'your_network_id'

# Define the RADIUS server details
radius_server = {
"host": "10.2.2.11", # Replace with your RADIUS server's IP address
"port": 1812, # Replace with the RADIUS port (usually 1812)
"secret": "" # Replace with your RADIUS secret
}

# Create the base URL for the Meraki API
url = f'https://api.meraki.com/api/v1/networks/{NETWORK_ID}/wireless/radiusServers'

# Set up headers with the Meraki API Key
headers = {
'X-Cisco-Meraki-API-Key': API_KEY,
'Content-Type': 'application/json'
}

# Prepare the payload to update the radius server
payload = [radius_server] # The payload must be a list of servers

# Make the PUT request to update the RADIUS server
try:
response = requests.put(url, headers=headers, json=payload)
response.raise_for_status() # Raise an exception for HTTP errors
print("RADIUS server updated successfully:", response.json())
except requests.exceptions.RequestException as e:
print(f"Error occurred while updating RADIUS server: {e}")

4 Replies 4

rahaliix131005
Community Member

Error that i got

image.png

mloraditch
Meraki Community All-Star
Meraki Community All-Star

I'm not sure where that URL is from (perhaps an older version of the api?) but the API to update radius for Wireless is this one: https://developer.cisco.com/meraki/api-v1/update-network-wireless-ssid/

You have to do it per SSID.

Org Wide Radius does exist but only for wired devices at this point.

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

Philip D'Ath
Meraki Community All-Star
Meraki Community All-Star

yes looked it up seems to be working only with the switch(wired devices), couldn't make it work with SSID's