My fleet has AirDrop disabled via configuration profile. Make sure your Macs have 'MDM Capability: Yes'; test and verify your APNS (push certificate); make sure devices don't have any pending or failed commands (and send a Blank push, just in case). You will not find any other reliable method for disabling AirDrop (the era of 'defaults write' is over).
@s_patang
the recent method and script which i have shared in other thread on the same topic is working for me on Ventura also
(https://community.jamf.com/t5/jamf-pro/config-profile-to-fully-disable-airdrop-mac-os-big-sur/m-p/2480470)
figured out a way to get this done for those who may have also encountered issues like I did....
for os Big Sur and Newer, use this method.
Create a configuration profile >restrictions>media>turn off airdrop> go to sharing services> uncheck airplay from there too.
Save
go into application & custom settings
click upload> under preference domain> add com.apple.applicationaccess
Property List > <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>allowAirDrop</key>
<false/>
</dict>
</plist>
add your scope then save your configuration profile. A restart is needed in order for this to take place.
Once restarted you should see Airdrop disabled.