The TeamViewer Active Directory Connector (AD Connector) helps administrators to create and set up TeamViewer accounts easily and centrally for all employees in a company via Active Directory without the need of adapting and using scripts and programming knowledge.

This article applies to TeamViewer customers with a Premium, Corporate, or Tensor license.

Requirements

To use this feature you need

Download the AD Connector

You can download the AD Connector from our website here.

Run the AD Connector

To run the program, please un-zip the file and double-click the Configure TeamViewer AD Connector.bat file.

Getting started

The TeamViewer AD Connector has two main areas as Configuration and Scheduled task.

image.png

The configuration UI provides the following features:

  • Show and adapt the sync configuration.
  • Validate the entered TeamViewer API token.
  • Manually trigger a run of the synchronization script.
  • Install/Uninstall a scheduled task to run the synchronization script automatically.

The configuration UI requires to be run with elevated user rights to be able to install and uninstall the scheduled task. The script automatically asks for elevated rights (if required).

Configuration (3 tabs)

These are the available configuration parameters of the TeamViewer AD Connector.

Synchronization

Setting: API token

Description: The TeamViewer API access token is used for accessing the TeamViewer company user management. To create the script token:

  1. Sign in via https://login.teamviewer.com/
  2. Click on your profile in the top right corner of the interface and click Edit Profile.
  3. Click Apps.
  4. Click Create script token.
image.png

You only need the following permissions that you can open via the little arrow left to the options name: 

  • View, create, and edit for User Management
  • View full profile for Account Management ➜ Used to skip possible deactivation of API token owner
  • Optional: View, create, delete, edit and share groups for Group Management ➜ required when conditional access synchronization is enabled
image.png

_____

Setting: AD groups

Description: The LDAP identifier (without the leading `LDAP://` protocol scheme) of the AD groups used for the synchronization.

You do not need to run the AD Connector on a Domain Controller. All computers that are part of the domain can access the list of AD groups. 

_____

Setting: Test run

Description: If set to `true` the synchronization will not modify any TeamViewer user resources but instead only log the actions that would have been executed.

_____

Setting: Deactivate TeamViewer Users that are not members of the AD group

Description: If set to `true` TeamViewer users that are not a member of the selected AD group will be disabled.

_____

Setting: Include users of nested AD groups

Description: If set to `true` users of nested AD groups will be included.

_____

Setting: Include secondary email addresses for synchronization

Description: If set to `true` secondary email addresses will be included.

_____

Setting: Include secondary email addresses for synchronization

Description: If set to `true` secondary email addresses will be included.

TeamViewer Accounts

Setting: Language

Description: The two-letter language identifier used as the default language for newly created TeamViewer users. For example, it is used to localize the "Welcome" email.

_____

Accounts Type

Setting: Create accounts with predefined password

Description: The initial password used for newly created TeamViewer users to be changed by the user when logging in the first time.

_____

Setting: Create accounts with generated password

Description: A random password will be generated by the system. A password reset mail will be sent to the user automatically so that the user can change the password.

_____

Setting: Use Single Sign-On ➜ Included with Tensor license only

Description: Users can log in via SSO. The admin needs to add the Identifier they recieved when activating SSO for your company.

Groups

Setting: Enable TeamViewer Conditional Access group synchronization ➜ Included with Tensor license only

Description: Users can synchronize the given AD groups and their respective users with the directory groups for conditional access in TeamViewer. Those groups can then be used to restrict/allow TeamViewer functionality for certain users.

_____

Setting: Enable TeamViewer user groups synchronization ➜ Included with Tensor license only

Description: Users can synchronize the given AD groups and their respective users. Those groups can then be used as a User Group in the TeamViewer (Classic) Management Console to restrict/allow TeamViewer functionality for certain users

Scheduled task

The scheduled task will be created with the specified interval as:

...\TeamViewer\TeamViewer AD Connector

The output of the scheduled task is redirected to the specified log file location.

You can set the interval for the task as you like. The interval is currently on an hourly base.

Change user for scheduled task:

You might need to modify the user in order to have the necessary execution permissions for the scheduled task. To change the user of the scheduled task:

  1. Go to Start ➜ Administrative Tools ➜ Task Scheduler
  2. Select Task Scheduler Library
  3. Right-click the scheduled task to modify, select Properties and select the General tab, or double-click the scheduled task.
  4. Click the Change User or Group... button
  5. Enter <USER> in Enter the object name to select text box and press Check Names
  6. Press OK button
  7. Under When running the task, use the following user account: you should now see this user.
  8. Click OK, then quit Scheduled Tasks.
image.png

User Synchronization Logic

The actual synchronization is done by the Invoke-Sync.ps1 script in the TeamViewer ADConnector directory using the following logic:

  • Users of the configured AD group that are not yet part of the configured TeamViewer company (identified by the API token) will be created with the specified initial password.
  • Users of the configured AD group that are already part of the configured TeamViewer company will be activated and/or updated if the name of the user has been changed or the TeamViewer user is deactivated.
  • If configured, users of the TeamViewer company that are not present in the configured AD group will be deactivated.

Identification of users is done based on their email addresses. If configured, the secondary email addresses of AD users are also taken into account for the mapping between AD users and TeamViewer users.