Print View

TeamViewer Host Assignment Fails in Jamf Pro on macOS with Error 206


When deployed from Jamf Pro TeamViewer_Assignment fails to associate using the -api-token parameter with the error 206 on macOS.

If the command is run from a terminal prompt it successfully assigns the computer.

Verifying package integrity...
Installing TeamViewer Host...
Successfully installed TeamViewer Host.
Running script TeamViewer Host Assignment...
Script exit code: 206
Script result:
Error running script: return code was 206.


All of the TeamViewer processes must be fully running, before an assignment will be successful.

$ ps aux | grep -i TeamView | grep -v grep
user              6881   0.0  0.3  4432632  47748   ??  S     3:06pm   0:00.47 /Applications/ -RunAsAgent YES
user              6879   0.0  0.1  4355920  15880   ??  S     3:06pm   0:00.63 /Applications/ -RunAsAgent YES -Module Host
root              6877   0.0  0.1  4352056  16400   ??  Ss    3:06pm   0:00.58 /Applications/ -Module Host

Use the following script in Jamf Pro to ensure all processes are fully running:
while true; do
	process=$(ps aux | grep TeamViewerHost | grep -v grep | wc -l)
        echo "Process: $process"
	if [ $process -gt 2 ]; then
		echo "Assigning..."
		sleep 15
                /Applications/ -api-token $APITOKEN -group-id $GROUPID -alias "$(hostname -s)" -grant-easy-access -reassign
		exit $?
		echo "Waiting for TeamViewer to start..."
		sleep 15



TeamViewer Host 15
Jamf Pro 10.x
Apple macOS 10.15

Created: 22nd May 2020
Updated: 22nd May 2020

Print View

© 2005-2024 Jamie Morrison