Can the MSSQL JDBC driver connect to a SQL SERVER using a GMSA account?

Chiru 20 Reputation points

Is it possible for the MSSQL JDBC driver to connect to a SQL SERVER using a GMSA account? If it is, what should the connection string look like? Can the connection URL include the GMSA account name, such as "jdbc:sqlserver://<server>:<port>;databaseName=<database>;user=<GMSA account name>" ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,913 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 102.3K Reputation points

    Yes, you can connect with a GMSA account - but only if you log on to Windows with that account. (Which would imply that your Java program is running as a service.)

    When you log with Window authentication, you first need to log on Windows with that Windows user. You cannot log on SQL Server with a different Windows user.

1 additional answer

Sort by: Most helpful
  1. CosmogHong-MSFT 23,946 Reputation points Microsoft Vendor

    Hi @Chiru

    A 64-bit architecture is required to run the Windows PowerShell commands used to administer group Managed Service Accounts.

    Please refer to this doc for more details: Getting Started with Group Managed Service Accounts.

    Best regards,

    Cosmog Hong

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.