Managing AirDrop Discoverability Options

AirDrop debuted on the Mac with the release of OS X 10.7 Lion in 2011. A short time later Jared Nichols discovered a way to disable the feature that was then widely shared by Rich Trouton.

For over a decade MacAdmins have been successfully using this preference in scripts and later in configuration profiles to disable AirDrop. However the payload is not officially documented by Apple.

Another preference that Apple has not documented is the ability to configure the discoverability settings of AirDrop: Everyone, Contacts Only or No One.

The method to set this preference has been revealed over the years, but a recent discussion in the MacAdmins Slack made me realize it has not been widely shared. Read on for the details.

The original unofficial preference from 2011 is the boolean DisableAirDrop key in the com.apple.NetworkBrowser payload. It requires the user to logout before taking effect but when set to true completely disables AirDrop by removing the feature from the Finder.

Apple’s officially documented way to disable AirDrop is in the Restrictions profile by setting the allowAirDrop key in com.apple.applicationaccess payload to false. This value is the reverse of the older method but the end result is the same.

As of macOS 12.2.1 both payloads work to disable AirDrop, however I would recommend using the latter moving forward.

The above methods are great for companies that need to disable AirDrop compeltely, but are not helpful when the desire is to leave AirDrop enabled but restrict which other Macs and iPhones can discover the computers in your fleet. This is where the new preference payload comes into play.

Users are able to pick between three options in the Finder that control the discoverability of their Mac by other devices: Everyone, (iCloud) Contacts Only or No One.

To control these options admins can configure the DiscoverableMode key in the com.apple.sharingd payload with string values of: “Everyone” or “Contacts Only” or “Off”  Doing so takes effect immediately with no need for the user to logout and back in, as is required when disabling AirDrop completely.

I tested this in macOS 12.2.1 and it works as expected. However unlike typical behaviour with configuration profiles, enforcing this setting does not disable the GUI controls. Users are still able to change between the three options, however doing so has no effect, and the GUI will revert when the Finder window is closed and reopened.

This option can also be scripted which could prove useful in scenarios where you want to allow users to occasionally choose a more permissive setting, but have it automatically revert with a scheduled script.

I have an example configuration profile on my GitHub and will add the payload to the ProfileManifests project soon.

1 comment on “Managing AirDrop Discoverability Options

  1. Pingback: Weekly News Summary for Admins — 2022-02-18 – Scripting OS X

Leave a Reply

Your email address will not be published. Required fields are marked *