01-23-2025 01:32 PM
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}")
01-23-2025 01:34 PM
Error that i got
01-23-2025 02:08 PM
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.
01-27-2025 11:42 AM
Have you looked at the org-wide RADIUS feature?
01-29-2025 03:19 PM
yes looked it up seems to be working only with the switch(wired devices), couldn't make it work with SSID's
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide