Connect to External SQL Database using AD User

Hello,

My client has a plan to switch all user into AD user, this include the SQL user as well. Currently, our application has 1 connection to their SQL database to queries from their tables. When i tried to create new connection using the AD User and test connection it gives me error

Connection String test failed: Login failed for user 'User name here'.

Is there additional parameter that I'm missing?


Hi Kevin,

With the brief description you wrote of your problem, I would not know how to help you.

Are you talking about AD or AzureAD? AzureAD is something else then AD.

For example AD you need to have an on-premise OutSystems installation, is that the case?

Share the details of the configuration and which code you implemented to authenticate the user.

Share the service center error log in more detail, the call stack is always useful to find the action that raised the exception. From there you can figure out what is wrong.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Kevin,

With the brief description you wrote of your problem, I would not know how to help you.

Are you talking about AD or AzureAD? AzureAD is something else then AD.

For example AD you need to have an on-premise OutSystems installation, is that the case?

Share the details of the configuration and which code you implemented to authenticate the user.

Share the service center error log in more detail, the call stack is always useful to find the action that raised the exception. From there you can figure out what is wrong.

Regards,

Daniel

 Hi Daniel,

*EDITED*

Sorry for the misunderstanding, AD here stands for Active Directory. It's windows authetication to login into SQL Server. Yes the QA and Production environment is On-Premise installed in my client place.

They are planning to switch the SQL Server user into AD user, so in the Service Center -> Administration -> Database Connections I'm trying to test first if I can connect to the same database using this AD user.

Here is the call stack from service center error log


Login failed for user 'The username here'.
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at OutSystems.HubEdition.Extensibility.Data.TransactionService.BaseTransactionService.GetConnection()
at OutSystems.HubEdition.Extensibility.Data.TransactionService.BaseTransactionService.CreateConnection(Int32 numRetries)
   at oml#eiegplef.oml#tploctir(IIntegrationDatabaseConfiguration mx, String& my)