• Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Call Us Today! 512-640-5750
Data Architect as a Service | Remote DBA Services
  • Services
    • Analytics Architecture
    • Database Architecture
    • Software Architecture
    • Microsoft Fabric Consulting
      • Microsoft Fabric Health Check
  • About Us
    • Testimonials
    • Recommendation Program
    • Jobs
      • Data Engineering Consultant
      • Principal Data Analytics Architect
  • Resources
    • Blog
    • Videos
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

Tag Archive for: gMSA

Group Managed Service Accounts with SQL Server: Stop Managing Passwords

Security, SQL Server

Somewhere in your environment, a SQL Server service account password hasn’t changed in years. Several people know it, and it’s probably in a script or a spreadsheet. I wouldn’t be surprised if someone hasn’t even put it in an AI chat.  Group managed service accounts (gMSAs) remove that problem.

This past weekend, during my Advanced Security Protection talk (online version you can watch) at Days of Data in Pittsburgh, someone asked: “What are the best practices for encrypting passwords in connection strings?” That reminded me I’m overdue to blog about Group Managed Service Accounts, so here we are, because the best way to encrypt them is to not need to encrypt them. 🙂

The Risk Hiding in Plain Sight

Group Managed Service Accounts in SQL Server allow you to not manage the passwords or the rotation of them.In our assessments, service accounts are often the least governed identities in the domain. They run SQL Server, scheduled jobs, and web applications. Because changing a password risks an outage, many never expire.

That makes them attractive targets. They are often over-privileged, rarely monitored, and unchanged for years. An attacker who steals one gets a trusted identity nobody watches.

When we add customers to our remote database managed services and set up monitoring, we encourage customers to use them, and more often than not, it raises questions about whether we should use them for our SQL Server service account.

What are Group Managed Service Accounts (gMSAs)?

A gMSA is a managed domain account that gives you automatic password management and simplified service principal name (SPN) management. It works like a standalone managed service account, but across multiple servers. Microsoft cites these benefits :

  • 240-byte random passwords that resist brute-force and dictionary attacks

  • Password changes every 30 days by default, without maintenance windows

  • Deployment across server farms, such as load-balanced and clustered services

No person needs to know or store the password. That is different from saying it can never be exposed. Anyone allowed to retrieve it, including a compromised member server, can read it. gMSA passwords also derive from the domain’s KDS root key, so protect that key like any other crown-jewel secret.

A Bonus: Fewer Secrets in Connection Strings

Many teams encrypt connection strings in config files because they contain a SQL login and password. If an application runs as a gMSA and connects with Windows authentication, the string looks like Integrated Security=SSPI with no credentials in it. That leaves nothing to encrypt for that connection.

This has limits:

  • It applies only to Windows-authenticated connections. SQL logins, third-party API keys, and cloud credentials still need protection.

  • The application must run as the gMSA, and the gMSA needs a SQL Server login with least-privilege permissions.

  • Connections that hop through multiple servers may need Kerberos delegation.

  • Encrypting traffic with TLS is a separate control. Keep doing it.

What Your Team Should Do

  1. Inventory every service account, with owner, privileges, and password age.

  2. Start with SQL Server, IIS app pools, and scheduled tasks. Create scheduled tasks in PowerShell, because the GUI doesn’t accept a gMSA.

  3. Verify that all domain controllers are patched, especially those running Windows Server 2025.

  4. Restrict who can retrieve each gMSA password and who can create service accounts.

  5. Grant each account only the rights it needs.

  6. Record exceptions that can’t use a gMSA, and set a review date.

The commands below follow Microsoft’s documentation. Run them in a lab first.


# Once per forest (Domain or Enterprise Admin). Wait ~10 hours in production.
# Make sure to change domain name, computer objects, and Service Account Name
Add-KdsRootKey -EffectiveImmediately
# Single-DC lab only:
# Add-KdsRootKey -EffectiveTime ((Get-Date).AddHours(-10))
New-ADGroup -Name "gMSA-SQLServers" -GroupScope Global -GroupCategory Security
Add-ADGroupMember -Identity "gMSA-SQLServers" -Members "SQL01$","SQL02$"

New-ADServiceAccount -Name gmsaSQL -DNSHostName gmsaSQL.yourdomain.com `
-PrincipalsAllowedToRetrieveManagedPassword "gMSA-SQLServers" `
-KerberosEncryptionType AES256

# Reboot the servers after adding them to the group, then on each:
Install-ADServiceAccount -Identity gmsaSQL
Test-ADServiceAccount -Identity gmsaSQL

Then set the SQL Server service to YOURDOMAIN\gmsaSQL$ use a blank password using SQL Server Configuration Manager, and restart the service. Verify that SPNs are registered for Kerberos.

Next Step

Not sure how many unmanaged service accounts you have? Book a ProcureSQL assessment, and we’ll inventory them and also evaluate several other security best practices.

 

October 13, 2026/by John Sterrett
https://procuresql.com/wp-content/uploads/2026/10/Group-Managed-Service-Accounts-with-SQL-Server.avif 940 1672 John Sterrett /wp-content/uploads/2024/05/Data-Architecture-as-a-Service-with-ProcureSQL.png John Sterrett2026-10-13 21:45:412026-10-13 21:59:14Group Managed Service Accounts with SQL Server: Stop Managing Passwords
Join Our Newsletter
  Thank you for Signing Up
Please correct the marked field(s) below.
1,true,6,Contact Email,21,false,1,First Name,21,false,1,Last Name,2
Search Search

Blog Categories

  • $150 Challenge
  • Advice
  • Announcements
  • Artificial Intelligence
  • Awards
  • Azure Data Factory
  • C-Level
  • Cloud
  • Community
  • Conferences
  • Data Architecture
  • Data Integration
  • Data Visualization
  • Data Warehousing
  • DBA 101
  • Design
  • Disaster Recovery or High Availability
  • Education
  • Fabric Dev Ops
  • Fabric Lakehouse
  • Fabric Lakehouses
  • Fabric Mirroring
  • Fabric Notebooks
  • Features
  • General
  • Health Checks
  • Lab
  • Microsoft Fabric
  • Newsletter
  • Performance Tuning
  • Power BI
  • ProcureSQL
  • Python
  • Reporting
  • Security
  • SQL Server
  • sql server 101
  • SQLServerPedia Syndication
  • syndication
  • The Blog
  • Uncategorized
  • Visual Studio Credit

Tags

#SQLFamily Artifical Intelligence automatic tuning availability group azure azure sql database backup Backups career Data Loss Data Platform DBA Denver Differential Backup Disaster Recovery Fabric Fabric Architecture Full Backup High Availability Houston Marketing Database Administrator Microsoft Microsoft Fabric Microsoft SQL Server mirroring parameter sniffing PASS performance tuning Professional Development query store Recovery Recovery Model Restores Security SQL Saturday SQL Server SQL Server 2017 sql server 2019 sql server 2025 SSMS System Databases Transaction Log Backup tsqltuesday Tuning Wait Stats

Archives

  • November 2026
  • October 2026
  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • November 2025
  • October 2025
  • September 2025
  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • February 2024
  • January 2024
  • November 2023
  • October 2023
  • March 2023
  • January 2023
  • May 2022
  • April 2022
  • November 2021
  • September 2020
  • August 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • July 2019
  • April 2019
  • November 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • August 2017
  • July 2017
  • June 2017
  • April 2017
  • December 2016
  • November 2016
  • October 2016
  • July 2016
© Copyright 2026 - ProcureSQL - 1464 East Whitestone Blvd., Suite 1902 Cedar Park, TX 78613, USA
  • Link to Facebook
  • Link to Instagram
  • Link to LinkedIn
  • Link to Youtube
  • Link to X
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}