Requiring Entra authentication: the basics
What does a service that still trusts a local credential actually look like?
Most Azure services can be reached two ways: through a Microsoft Entra identity that the directory issues, governs and can revoke in seconds, or through a local credential that lives on the resource itself. A Linux virtual machine can accept an SSH password instead of a key. An Azure SQL server can have only a SQL login and no Entra administrator. An Azure Synapse workspace can keep its local SQL admin login enabled alongside Entra. A Cosmos DB account can hand out a primary account key that grants full access to anyone who holds the string. A Service Fabric cluster can authenticate clients with a certificate alone rather than through Entra. Each is its own Defender for Cloud recommendation, but the underlying weakness is the same: a way in that the directory cannot see, cannot apply conditional access to, and cannot switch off the moment a person leaves or a key leaks.
Microsoft Defender for Cloud turns each of these into its own recommendation under the identity-management pillar of the Microsoft Cloud Security Benchmark, which is why one estate can fail the same idea five different ways at once. 'Authentication to Linux machines should require SSH keys', 'SQL servers should have a Microsoft Entra administrator provisioned', 'Azure Synapse Workspace authentication mode should be Microsoft Entra ID Only', 'Azure Cosmos DB accounts should use Microsoft Entra ID as the only authentication method' and 'Service Fabric clusters should only use Microsoft Entra ID for client authentication' read as five separate problems on the report. They are one job: make Entra the front door so that identity, not a static secret, is what proves who is connecting.
Most of this exposure is drift, not intent. A VM image that shipped with password authentication on, a SQL server stood up before anyone added the Entra admin, a Cosmos DB account whose connection string was pasted into a config file two years ago. The work is to find every service that still accepts a local credential, provision the Entra identity that should own it, and then disable the local path so the only way in is one the directory can govern.
In this lesson you will learn how Azure services express the choice between Microsoft Entra identity and local credentials, how to find every service in a subscription that still accepts a local secret, and how to move them onto Entra without locking out the applications that depend on them. The Controls this lesson covers section lists every Defender for Cloud recommendation in this capability, each linking to a deep page with the exact check and a copy-and-paste fix.
The key that never expired
The recurring theme in cloud breaches is not a clever exploit, it is a credential that should not have still worked. A storage or database account key copied into a config file, a notebook or a public repository years ago keeps granting full access until somebody notices and rotates it, because a static secret has no concept of who is holding it or whether they should still be allowed in. Microsoft Entra inverts this: access is a short-lived token tied to an identity the directory governs, so a leaving employee loses access the moment their account is disabled and a leaked token expires on its own. That is why every one of these recommendations points the same way, towards an identity the directory can see and revoke, and away from a secret that outlives the person who created it.
Finding local-credential access across a subscription
Sam is the security lead at a scale-up preparing for its first ISO 27001 audit. Defender for Cloud shows identity findings spread across SQL servers, a Synapse workspace, two Cosmos DB accounts and a handful of Linux VMs that pre-date the team's current guardrails.
Rather than work the findings one by one, Sam starts by listing which Azure SQL servers have no Microsoft Entra administrator at all, because a server with no Entra admin cannot use Entra authentication for anything and is the clearest signal of a service still living entirely on local logins.
Start by listing every SQL server and whether it has a Microsoft Entra administrator provisioned. A blank login is a server with no Entra path at all.
A server with no Microsoft Entra administrator has no Entra authentication path whatsoever. Provision the admin first, then you can move clients off SQL logins and eventually disable them.
How Defender for Cloud decides a service still trusts a local credentialdeep dive
Each recommendation resolves to a specific property the directory cannot govern. For Linux VMs, the check is a Guest Configuration policy that inspects the machine's SSH daemon: if 'PasswordAuthentication' is enabled rather than the VM relying on key pairs, it reports non-compliant, which is why the VM needs the Guest Configuration extension installed before the recommendation can evaluate at all. For SQL servers, the check is simply whether an Entra administrator object exists on the server; with none provisioned, there is no Entra authentication path. For Synapse, the property is 'azureADOnlyAuthentication': when it is false, the local SQL admin login is still enabled alongside Entra. For Cosmos DB, the property is 'disableLocalAuth': when it is false, the account's primary and secondary keys still grant full access. For Service Fabric, the check is whether the cluster's 'azureActiveDirectory' block is configured for client authentication rather than relying on a client certificate alone.
Defender for Cloud evaluates these against the Microsoft Cloud Security Benchmark on a periodic cycle, so a fix does not flip the recommendation to Healthy instantly. The control-plane change itself is immediate, but the posture catches up on the next assessment. This matters when you are gathering audit evidence against a deadline.
There is an ordering trap worth naming. Provisioning an Entra path and disabling the local one are two distinct steps, and doing them in the wrong order locks people out. You must establish the Entra identity, the SQL admin, the managed identity, the SSH key, the Synapse Entra admin, and confirm the real clients can use it, before you disable the local credential. The Cosmos DB API matters too: full role-based access control as the only authentication method is supported on the NoSQL (Core) API, so disabling local auth there has a clean managed-identity path, while other APIs have more limited support and need checking before you turn keys off.
What is the impact of leaving local credentials enabled?
The direct impact is unrevocable, untraceable access. A SQL login, a Cosmos DB account key or an SSH password is a static secret: anyone who holds the string is in, the directory has no record of who that is, and the only way to cut access is to rotate the secret everywhere it is used. A password protected SSH endpoint is also exposed to brute-force attempts in a way that key-based authentication is not. When a credential leaks, into a config file, a leaked repository, a former employee's notes, it keeps working until somebody notices and rotates it, which is often long after the damage.
The second-order impact is blast radius and accountability. Microsoft Entra brings conditional access, multi-factor authentication, short-lived tokens and a full audit trail of who connected. A local credential brings none of that, so every service that still accepts one is a place where you cannot enforce your access policy or reconstruct what happened after an incident. Moving to Entra shrinks the set of standing secrets you have to protect down to the few you genuinely cannot avoid.
On the compliance side, every modern framework, ISO 27001, SOC 2, HIPAA, PCI DSS and the UK and EU data-protection regimes, expects evidence that access is centrally managed, that privileges can be revoked promptly, and that strong authentication is enforced. A passing set of these identity recommendations across every subscription is one of the most direct artefacts you can hand an auditor to show that access is governed rather than scattered across secrets.
How do you move services onto Entra safely?
Work the capability as one loop rather than chasing individual findings. The order matters: establish the Entra path and confirm the real clients can use it before you disable any local credential, so you do not lock out a live service.
1. Inventory every service by authentication path
List the SQL servers with no Entra administrator, the Synapse workspaces with local auth still enabled, the Cosmos DB accounts with local auth on, the Linux VMs accepting SSH passwords, and the Service Fabric clusters without an Entra block. Treat this inventory as the source of truth, not the Defender finding count, because the same weakness shows up under five different recommendation names.
2. Establish the Entra path first
Provision a Microsoft Entra administrator on each SQL server and Synapse workspace, generate SSH key pairs for the Linux fleet, configure the Entra application registrations for Service Fabric client authentication, and grant the consuming applications a managed identity with the right data-plane role. Nothing is disabled yet; you are building the new front door before closing the old one.
3. Migrate clients, then disable the local credential
Switch each application and script from its connection string, account key or password to the managed identity or Entra token, confirm it connects, then disable the local path: set Synapse to Entra-only, set 'disableLocalAuth' on the Cosmos DB account, set 'PasswordAuthentication no' on the VMs. Prioritise services that hold data and whose secret is most widely shared. This is the step that actually removes the unrevocable credential.
4. Ratchet it shut with Azure Policy
Assign policies so new resources cannot come up trusting a local credential: audit or deny SQL servers without an Entra admin, Cosmos DB accounts with local auth enabled, and Synapse workspaces that are not Entra-only, and apply the Guest Configuration baseline to flag any Linux VM that re-enables password authentication. This makes the safe configuration enforced rather than merely remembered.
# 1. Establish the Entra path FIRST: provision a SQL Entra admin (an Entra group is best).
gid=$(az ad group show --group "sql-admins" --query id -o tsv)
az sql server ad-admin create \
--resource-group rg-data \
--server-name sqlprodcust \
--display-name "sql-admins" \
--object-id "$gid"
# 2. Switch the Synapse workspace to Microsoft Entra ID Only (local SQL admin disabled).
az synapse workspace update \
--resource-group rg-data \
--name synprodanalytics \
--use-microsoft-entra-only-authentication true
# 3. Disable the Cosmos DB account key ONLY after clients use a managed identity (NoSQL API).
az resource update \
--resource-group rg-data \
--name cosmosprodcust \
--resource-type "Microsoft.DocumentDB/databaseAccounts" \
--set properties.disableLocalAuth=true
# 4. Ratchet it shut: assign the built-in policy by its EXACT display name (look up its id, never hardcode a GUID).
pid=$(az policy definition list \
--query "[?displayName=='An Azure Active Directory administrator should be provisioned for SQL servers'].name" -o tsv)
az policy assignment create \
--name require-sql-entra-admin \
--policy "$pid" \
--scope "/subscriptions/00000000-0000-0000-0000-000000000000" Quick quiz
Question 1 of 5Defender for Cloud shows findings for SQL servers without an Entra admin, a Synapse workspace, Cosmos DB accounts and Linux VMs. What is the most efficient way to think about them?
You scored
0 / 5
Keep learning
Go deeper on how each service in this capability expresses the choice between Microsoft Entra identity and a local credential.
- Configure and manage Microsoft Entra authentication with Azure SQL How to provision the Entra administrator and move a SQL server onto directory authentication.
- Disable local authentication in Azure Cosmos DB How role-based access works on the NoSQL API and how to set disableLocalAuth safely.
- Create and use SSH keys for Linux VMs in Azure How to move a Linux fleet off password authentication and onto key pairs.
You can now treat Microsoft Entra authentication as one capability rather than a scatter of findings across SQL, Synapse, Cosmos DB, Service Fabric and Linux VMs: inventory every local-credential path, establish the Entra identity that should own each service, migrate the real clients before you disable anything, and ratchet the estate shut with Azure Policy. The Controls this lesson covers section below links every recommendation in this group to its deep page and fix.
Back to the library