Choose the safest type of account for each service
A service account is an account that is not a person: it starts a Windows service, signs an integration in to an application or runs a script that fetches data at night. In an organisation with on-premises Active Directory and Microsoft 365 there are two families, and Microsoft has a clear preference within each.
| Type | Where | When |
|---|---|---|
| Group managed service account (gMSA) | Active Directory | The first choice for on-premises services, also when they run on several servers. Windows manages the password. |
| Standalone managed service account (sMSA) | Active Directory | If a gMSA is not possible. Works on one server. |
| Computer account | Active Directory | If a managed account is not possible. Drawback: you cannot see which service on that computer uses the account. |
| Managed identity | Entra ID | For services that run in Azure. There is no password or secret to manage. |
| Service principal | Entra ID | For services outside Azure, or if a managed identity is not possible. Preferably with a certificate instead of a client secret. |
| Ordinary user account | AD or Entra ID | The last resort. Microsoft advises against it, and yet you come across it in almost every environment. |
A user account as a service account is so common because it always works: the vendor of an application asks for "an account with these permissions", and that is quickly made. The drawback is that such an account looks like an employee, behaves like one for every policy, and has a password someone has to manage by hand.
