IT Pro: How to read users from a SQL data source (e.g. Workday or ERP)

This article explains how you can use the Sql2Xink tool to pull data from a SQL data source to Employees in Xink. This is often used if your Active Directory (AD) is not updated and your HR department maintains the data in Workday or an ERP system (e.g. Dynamics 365).

The Sql2Xink tool will pull the data automatically when you set it up as a scheduled task or run it from a cmd prompt.

The tool features a user interface where you can configure a connection string and a SQL SELECT statement to pull the data from your database.  You can also map fields from your SELECT statement to fields in your Xink account.  We will walk you through the steps below.


Install Sql2Xink

Download the installer and double-click the file Sql2XinkSetup.msi to install the tool.

First, you need to configure the tool. Click "Configure Xink Sql2Xink" from the Start menu, which will start the main menu.


Connect to your SQL Server database

Click "Connect to the database" to connect the tool to your SQL Server.
Enter the connection string and click "Test" to test the connection. 

Example of a Connection Strings:

SQL on-premises:

Provider=sqloledb;Data Source=SERVERNAME;Initial Catalog=eMailSignature;User Id=eMailSignature_Superuser;Password=changemenow;

SQL Azure:

Provider=SQLOLEDB;Data Source=sqlserver.database.windows.net;Initial Catalog=eMailSignature;Authentication=ActiveDirectoryPassword;User ID=eMailSignature_Superuser;Password=changemenow;Use Encryption for Data=true;

Click "Save" to save the connection string.


Connect to Xink Cloud

Click "Connect to Xink Cloud" to connect the tool to Xink's API.



You need a Xink API user to connect. Read the article on how to create an API user.
The API user must have these permissions set:

Enter the username and password for your API user and click "Test" to ensure that the API user login is okay.
Click "Save" to keep your settings and dismiss the dialogue.


Map fields from SQL to Xink

The final step is to tell Sql2Xink which fields from the SQL database go where in Xink. Click "Map fields" to set the mapping.


Enter your SQL SELECT statement at the top. The SQL FROM must include the SQL table.

Now click "Refresh fields".  Sql2Xink will now get the fields from your SQL statement, and it will contact the Xink API to retrieve all fields for your Xink account.  If the field names from your SQL statement match the Xink field names, the tool will automatically set up a mapping between the two.

Use the dropdowns to set where the SQL fields should go in Xink.

Test the configuration

Now the time has come to test the export from your SQL database to Xink.  
Start a cmd prompt and run the Sql2Xink.exe update from the cmd prompt.
For a default installation, you will find Sql2Xink.exe in C:\Program Files (x86)\Xink Sql2Xink.
Check for any errors in the output.


Run Sql2Xink on a schedule

To always keep Xink updated from your SQL database, you should set up a scheduled task to run 'Sql2Xink.exe update' daily.


Remove users that are no longer in the SQL database

Sql2Xink can remove employees from Xink who are no longer in the SQL database. You can enable this feature by adding the --remove switch when you run 'Sql2Xink.exe update', e.g. 'Sql2Xink.exe update --remove'. You may also use the shorter version 'Sql2Xink.exe update -r'.

You can always get help from the cmd prompt by running 'Sql2Xink.exe help update'.

Preserving Manual Edits

Sql2Xink will preserve user changes when the "Do not update fields that were set or changed manually" is enabled in the Xink portal. This includes manually edited fields by Xink admins and modified fields that were set to be "Editable by the employee". See How to enable Preserve Manual Edits Feature.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.