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 ?

 

 

2 REPLIES 2

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


Vilia (my company) | GitHub | LinkedIn
slangley
23-Emerald III
(To:Yoshihiko.N)

Hi @Yoshihiko.N 

 

It appears that a response has been provided that answers your question.  For the benefit of other Community Members who may have the same question, it would be great if you could designate it as the Accepted Solution.

In the event that this response did not answer your question, please post your current status so that we can continue to support.

Thanks for using the PTC Community!

Regards,

--Sharon

Announcements


Top Tags