Solution 1:

There is no documented workaround to short circuit this security control on macOS Catalina.

My recommendation is to use Screen Sharing and Remote Desktop since you can kickstart that on and off by command. Based on whether your macs are MDM managed, you may not be able to remotely grant access to the physical machines and have to physically go in or trace the ethernet MAC address to switch ports on the switch.

Possibly if you have only one version of macOS there’s something that might be possible, but the question as stands it would be best to use AppleRemote Desktop as the most trusted / privileged tool to remotely compromise the security of these Macs. You’re up against protections to prevent stealthy snooping, so the more you are acting like a proper remote administration, the less friction you will have and once Remote Desktop is set, cleanup is scriptable and very easy (and logged).

These controls must be user initiated, even with a fully functioning MDM like JAMF. You can report if a user has allowed or denied this, but Apple is blocking this pretty effectively in Summer 2020.

  • https://www.jamf.com/jamf-nation/discussions/35287/zoom-app-asks-for-admin-credentials-when-use-microphone-and-camera#responseChild200127