TeamViewerHost for macOS deployment via Intune - Easy Access
Hi,
I am trying to deploy TeamViewerHost for macOS via Intune. I use this bash script:
#!/bin/bash
cd /tmp
#Download and Install custom host
echo "Downloading and Installing custom host"
cd /tmp
curl -L https://download.teamviewer.com/download/version_15x/CustomDesign/Install%20TeamViewerHost-idc123456.pkg -o TeamViewerHost-idc123456.pkg
installer -pkg TeamViewerHost-idc123456.pkg -target /
#echo "60 seconds wait"
sleep 60
#Assignment
echo "Running the account assignment"
computername=$(hostname -s)
sudo /Applications/TeamViewerHost.app/Contents/Helpers/TeamViewer_Assignment -api-token MYAPITOKEN -alias $computername -group-id 123456789 -grant-easy-access
#echo "60 seconds wait"
sleep 60
It works with no issues, it assigns to the correct group, but Easy Access is not set up as default. I have to open the preferences and turn it on manually for each device.
Is there any way for it to be turned on automatically during the deployment?
Answers
-
Hey,
Thank you for sharing the script! It works as you mentioned - no issues, except the easyaccess is seemingly ignored.
You've probably figured it out since you made this post last year but I decided to share my experience.
I tried to manually set the assignment by going to the TeamViewer Helper folder via the terminal and running the new syntax for this cmd:
"sudo ./TeamViewer_Assignment -api-token MYAPITOKEN -alias $computername -group-id 123456789 -grant-easy-access"
which is:
"sudo ./TeamViewer_Assignment -assignment_id 'MYAPITOKEN' -alias $computername -group-id 123456789 -grant-easy-access"
A surprisingly helpful error told me something along the lines of "cannot perform 2 actions in 1 cmd, split them into 2 cmds"... This led me to try with just "sudo ./TeamViewer_Assignment -assignment_id 'MYAPITOKEN'"
(In my case I don't really care for the group assignment and if you don't specify Device Alias, it defaults to the computer name anyway)
This worked and it assigned the device PLUS it enabled the easy-access (I read somewhere in the docs that this is the default state if you don't specify it, just like with the alias)
Cheers!
1