cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

How to connect Azure SQL server with Service Principal

Yoshihiko.N
14-Alexandrite

How to connect Azure SQL server with Service Principal

Dear Developers,

 

we have a database in Azure and need to connect thingworx with the database.

we cannot use a SQL local account for the connection due to security perspective.

 

we have a service principal and confirmed we can connect with the database via the service principal.

 

I want to know how to create a thing which can connect with the SQL by using the service principal.

 

what thingtemplate do we need to use ?

what connection string do we need to use to specify the authentication mode ?

is it ok to put client ID as user name and secret key as password ?

 

 

1 REPLY 1

Hello @Yoshihiko.N,

 

You can provide authentication=ActiveDirectoryServicePrincipal JDBC connection string parameter, and use your client ID as the username and the service principal's secret as the password. See MS docs: https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties

 

You can find information about how to create a database Thing in Help: https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx/Help/Extensibility/jdbc_extension.html

 

Just wrap your Azure SQL JDBC driver in an extension, as this article explains, and specify your normal JDBC connection string, as you'd do with any other web app.

 

/ Constantine

Announcements


Top Tags