Skip to main content
Question

How to get the MAC current connected WiFi SSID name

  • August 12, 2026
  • 5 replies
  • 189 views

alexraja
Forum|alt.badge.img+1

In macOS Tahoe, the command to get the current AirPort network is not working as expected, and the SSID value is showing as <redacted>.

Could you please suggest any alternative script or method to retrieve the currently connected Wi-Fi SSID name?

This is required to help us deploy the Network Configuration Profile only when the Mac is connected to an out-of-office network.

Thank you.

5 replies

joboo72
Forum|alt.badge.img+5
  • Jamf Heroes
  • August 12, 2026

We use this extension attribute from Dan K. Snelson. Can confirm it works on Tahoe and Sequoia.

https://snelson.us/2024/09/determining-a-macs-ssid-like-an-animal/#update-september-2025


alexraja
Forum|alt.badge.img+1
  • Author
  • New Contributor
  • August 12, 2026

Thanks ​@joboo72 for your help. Unfortunately, we tested the scripts on macOS Tahoe 26.6.1, and they are not working as expected. The same scripts are working fine on macOS versions up to Sequoia, but in Tahoe, the output is showing as <redacted>.


JRM5513
Forum|alt.badge.img+4
  • Contributor
  • August 16, 2026

You can use my extension attribute, it should bypass the new privacy restriction :

#!/bin/zsh
# https://medium.com/@laclementine

# Enable SSID visibility (required for modern macOS privacy restrictions)
ipconfig sethidewifiinfo 0

# Get the Wi-Fi interface name (e.g., en0)
WIFI_INT=$(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $2}')

# Read SSID
CURRENT_SSID=$(ipconfig getsummary "$WIFI_INT" | awk -F ' SSID : ' '/ SSID : / {print $2}')

# Send result to Jamf
echo "<result>$CURRENT_SSID</result>"

exit 0

 


alexraja
Forum|alt.badge.img+1
  • Author
  • New Contributor
  • August 19, 2026

@JRM5513  getting below output:

failed to set hide WiFi info

<result><redacted></result>


JRM5513
Forum|alt.badge.img+4
  • Contributor
  • August 19, 2026

I see, I didn’t add sudo because it was already run as root by Jamf. The following should run locally on your Mac.
 

#!/bin/zsh
# https://medium.com/@laclementine

# Enable SSID visibility (required for modern macOS privacy restrictions)
sudo ipconfig sethidewifiinfo 0

# Get the Wi-Fi interface name (e.g., en0)
WIFI_INT=$(networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/{getline; print $2}')

# Read SSID
CURRENT_SSID=$(ipconfig getsummary "$WIFI_INT" | awk -F ' SSID : ' '/ SSID : / {print $2}')

# Send result to Jamf
echo "<result>$CURRENT_SSID</result>"

exit 0