azure - Using GMSA to connect SQL Server - Stack Overflow

I am able to connect from ORQA server to DB server with ORQA tool, using below jdbc connection string w

I am able to connect from ORQA server to DB server with ORQA tool, using below jdbc connection string with GMSA account

jdbc:sqlserver://<dbserver>:<port>;databaseName=<DBname>;integratedSecurity=true;encryption=true;trustServerCertificate=true;Persist Security Info=false;MultiSubnetFailover=true

Username parameter: GMSA$

Using azure devops pipeline, using self hosted agent from orqa machine, using the below connection string, I am getting error as below

<parameter name="connectionString" defaultValue="jdbc:sqlserver://dbserver:port;databaseName=dbname;encryption=true;trustServerCertificate=true;Persist Security Info=false;username=DOMAIN\GMSA$"/>

ERROR: test_GMSA.task:1: Login failed for user 'DOMAIN\GMSA$'

I am able to connect from ORQA server to DB server with ORQA tool, using below jdbc connection string with GMSA account

jdbc:sqlserver://<dbserver>:<port>;databaseName=<DBname>;integratedSecurity=true;encryption=true;trustServerCertificate=true;Persist Security Info=false;MultiSubnetFailover=true

Username parameter: GMSA$

Using azure devops pipeline, using self hosted agent from orqa machine, using the below connection string, I am getting error as below

<parameter name="connectionString" defaultValue="jdbc:sqlserver://dbserver:port;databaseName=dbname;encryption=true;trustServerCertificate=true;Persist Security Info=false;username=DOMAIN\GMSA$"/>

ERROR: test_GMSA.task:1: Login failed for user 'DOMAIN\GMSA$'

Share Improve this question edited Feb 1 at 9:09 Dale K 27.5k15 gold badges58 silver badges83 bronze badges asked Jan 31 at 10:37 Anusha MAnusha M 531 gold badge1 silver badge6 bronze badges 9
  • Have you checked the SQL Server logs? That will give you the true authentication error. If you don't understand that error, then please add it to the question. – Thom A Commented Jan 31 at 10:38
  • Wait, username=DOMAIN\GMSA$? You can't pass domain credentials like that; it's either SQL Authentication (with a username and password), or a trusted connection (and no credentials passed in the connection string). – Thom A Commented Jan 31 at 10:39
  • How to modify the jdbc connection string to connect using GMSA account. Not SQL server authentication user – Anusha M Commented Jan 31 at 10:43
  • The process needs to run under the credentials of that account. – Thom A Commented Jan 31 at 10:45
  • GMSA doesnt have the password. It connects only with username – Anusha M Commented Jan 31 at 10:46
 |  Show 4 more comments

1 Answer 1

Reset to default 1

Connection string should be

jdbc:sqlserver://dbserver:port;databaseName=dbname;encryption=true;trustServerCertificate=true;integratedSecurity=true; 

https://learn.microsoft/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver16

Then run the pipeline agent as a Windows Service configured to run under the GMSA.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745267673a4619556.html

相关推荐

  • azure - Using GMSA to connect SQL Server - Stack Overflow

    I am able to connect from ORQA server to DB server with ORQA tool, using below jdbc connection string w

    3小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信