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 ?
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