Calendar Icon White
December 5, 2026
Clock Icon
9
 min read

Azure Security Best Practices: A Checklist for 2026

Azure security best practices with az CLI commands: MFA through security defaults or Conditional Access, private storage, SQL firewall rules and Defender.

Azure Security Best Practices: A Checklist for 2026
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

The most important Azure security best practices are to require MFA for every user through security defaults or Conditional Access, block anonymous and public network access to storage, tighten Azure SQL firewall rules, close RDP and SSH to the internet, and keep Owner access to a handful of people. Each item below includes the az CLI command to check it.

This checklist is written for growing companies on Azure that need to pass SOC 2 or ISO 27001 without a dedicated cloud security team. It comes from Strac, a Y Combinator-backed data security company trusted by enterprises, whose cloud posture checks run daily across Azure, AWS and Google Cloud.

✨ Azure security best practices: where to start

Microsoft secures the platform; you secure your identities, configuration and data on it. Most real exposure in an Azure tenant comes from a short list of settings. This is how they look as findings in Strac, beside AWS and Google Cloud:

Strac Comply cloud posture view listing Azure, AWS and Google Cloud findings with severity and fix buttons
Azure findings in the same list as your other clouds.
Six Azure misconfigurations: MFA gaps, anonymous storage, open SQL firewalls, exposed RDP and SSH, too many Owners and short log retention

The checks below draw on the Microsoft cloud security benchmark and the CIS Microsoft Azure Foundations Benchmark, trimmed to what auditors and attackers care about most.

✨ 1. Require MFA: security defaults or Conditional Access

Identity is the front door to Azure, and a password alone does not hold it. Microsoft Entra ID gives you two ways to require multifactor authentication:

Comparison of Microsoft Entra security defaults and Conditional Access for requiring MFA

Security defaults are free and have been on by default for tenants created since October 2019, but many older tenants turned them off and never replaced them. If you have Entra ID P1, use Conditional Access instead: require MFA for all users, block legacy authentication, and exclude two monitored break-glass accounts. Microsoft is also enforcing MFA for Azure portal sign-ins and, from October 2025, for Azure CLI, PowerShell and infrastructure-as-code create, update and delete operations. Workload identities are excluded, which is one more reason to move automation to managed identities.

2. Keep storage accounts private

Since late 2023, new storage accounts disallow anonymous blob access by default, but older accounts often still allow it, and the public network endpoint stays on unless you change it. Check every account in a subscription:

az storage account list \
  --query "[].{name:name, anonymousBlob:allowBlobPublicAccess, network:publicNetworkAccess, sharedKey:allowSharedKeyAccess, minTls:minimumTlsVersion}" \
  -o table

Then lock down the ones that should not be public:

az storage account update -n ACCOUNT -g RG --allow-blob-public-access false
az storage account update -n ACCOUNT -g RG --min-tls-version TLS1_2
az storage account update -n ACCOUNT -g RG --public-network-access Disabled   # once private endpoints are in place

Turning off shared key access forces apps to authenticate with Entra ID instead of account keys, which removes a long-lived credential that otherwise ends up in config files. The same pattern on AWS is covered in our guide to finding and fixing public S3 buckets.

✨ 3. Tighten Azure SQL firewall rules

The checkbox "Allow Azure services and resources to access this server" creates a firewall rule from 0.0.0.0 to 0.0.0.0, named AllowAllWindowsAzureIps. It admits connections from any Azure IP address, including other customers' resources, not just yours. Find it and any wide ranges:

az sql server firewall-rule list -g RG -s SERVER -o table

# remove the allow-all-Azure rule
az sql server firewall-rule delete -g RG -s SERVER -n AllowAllWindowsAzureIps

# turn off SQL logins so access follows Entra ID identities
az sql server ad-only-auth enable -g RG -n SERVER
Five settings to lock down Azure storage and SQL: anonymous blob access, public network access, shared key access, SQL firewall and Entra-only authentication

Private endpoints are the cleanest answer for both storage and SQL: the service gets an address inside your virtual network and the public endpoint can be turned off. Enable auditing on SQL servers and keep automated backups with geo-redundancy where your recovery plan needs it.

Checking every subscription by hand before each audit?

Book a demo of Strac's Azure posture checks

4. Close RDP and SSH to the internet

A network security group rule that allows port 3389 or 22 from Internet, * or 0.0.0.0/0 puts a login prompt in front of the whole internet. Find them:

az network nsg list --query "[].{nsg:name, rg:resourceGroup}" -o tsv | while read nsg rg; do
  az network nsg rule list -g "$rg" --nsg-name "$nsg" \
    --query "[?access=='Allow' && direction=='Inbound' && (sourceAddressPrefix=='*' || sourceAddressPrefix=='Internet' || sourceAddressPrefix=='0.0.0.0/0')].{nsg:'$nsg', rule:name, port:destinationPortRange}" -o tsv
done

Replace them with Azure Bastion for admin access, or just-in-time VM access from Defender for Servers, which opens a port for a named user for a limited time.

5. Keep privileged roles small

Owner and User Access Administrator at subscription scope can do anything, including grant themselves more. List who holds them, cut the list to a few named people, and use Privileged Identity Management for just-in-time elevation if you have Entra ID P2:

az role assignment list --all \
  --query "[?roleDefinitionName=='Owner' || roleDefinitionName=='User Access Administrator'].{who:principalName, role:roleDefinitionName, scope:scope}" \
  -o table

Prefer managed identities over service principals with client secrets for anything running in Azure; a secret in an app setting is a hardcoded secret, as our guide to hardcoded secrets explains. Store whatever secrets remain in Key Vault with purge protection on.

6. Turn on Defender for Cloud and keep the logs

Microsoft Defender for Cloud gives free Foundational CSPM recommendations and a Secure Score, with paid plans for attack paths, compliance dashboards and workload protection. Microsoft notes that subscriptions created from October 27, 2026 start with Foundational CSPM off, so check it on each one. The Azure activity log, which records control-plane changes, is kept for 90 days; send it to a Log Analytics workspace or storage account with longer retention so you can answer questions about the whole audit period:

az monitor diagnostic-settings subscription create \
  --name activity-to-law --location eastus \
  --workspace /subscriptions/SUB_ID/resourceGroups/RG/providers/Microsoft.OperationalInsights/workspaces/LAW \
  --logs '[{"category":"Administrative","enabled":true},{"category":"Security","enabled":true},{"category":"Policy","enabled":true}]'

7. Protect Key Vault and plan for break-glass access

Key Vault holds the secrets everything else depends on, so check its own settings. Soft delete is now always on; also turn on purge protection so a deleted vault or key cannot be destroyed before the retention period ends, use Azure RBAC rather than legacy access policies, and limit network access:

az keyvault list --query "[].name" -o tsv | while read kv; do
  az keyvault show -n "$kv" \
    --query "{vault:name, purgeProtection:properties.enablePurgeProtection, rbac:properties.enableRbacAuthorization, network:properties.publicNetworkAccess}" -o tsv
done

az keyvault update -n VAULT -g RG --enable-purge-protection true

Microsoft recommends two emergency access accounts: cloud-only, excluded from normal Conditional Access policies, protected with phishing-resistant MFA such as a FIDO2 key, and alerted on every sign-in. They exist so a broken policy or a federation outage cannot lock every admin out of the tenant.

Azure traps for teams coming from AWS

Azure's model trips up teams who learned cloud on AWS. There are two separate permission systems: Microsoft Entra roles, such as Global Administrator, govern the directory, while Azure RBAC roles, such as Owner, govern subscriptions and resources. They are reviewed in different places, so audits often check one and miss the other. A Global Administrator can also elevate their own access to manage every subscription in the tenant, so the Global Administrator list is effectively an Owner list too. Subscriptions are closer to AWS accounts than resource groups are, and management groups play the role of AWS organizational units for policy inheritance. Keep Global Administrators to a small number of named people, review both role systems in every access review, and check the root-scope role assignments that elevation creates.

The Azure security checklist at a glance

AreaCheckWhy an auditor cares
IdentityMFA for all users via security defaults or Conditional AccessCC6.1: strong authentication
IdentityLegacy authentication blockedCC6.1: no MFA bypass
IdentityFew Owners; PIM for elevationCC6.3: least privilege
StorageNo anonymous blob access; TLS 1.2 minimumCC6.1, CC6.7: data protected
StoragePublic network access limited; private endpointsCC6.6: boundary protection
DatabasesNo AllowAllWindowsAzureIps; Entra-only auth; auditing onCC6.1, CC7.2
NetworkNo RDP/SSH from Internet; Bastion or JIT accessCC6.6: boundary protection
SecretsManaged identities; Key Vault with purge protectionCC6.1: credentials controlled
DetectionDefender for Cloud on every subscriptionCC7.2: anomaly detection
LoggingActivity log exported with long retentionCC7.2: monitoring

Many Azure customers run Microsoft 365 on the same Entra tenant, so identity findings often overlap; our guide to Microsoft 365 SOC 2 compliance covers that side of the audit.

Make it stick with Azure Policy

Fixing a setting once does not stop the next subscription from repeating the mistake. Azure Policy can audit or deny configurations at management group scope, so new subscriptions inherit the rules. Built-in policies cover most of this checklist, such as denying storage accounts that allow anonymous blob access or requiring private endpoints for SQL. Start in audit mode, fix what it finds, then switch the important ones to deny. Deny policies block a bad deployment at the moment someone tries it, which is far cheaper than finding it in next quarter's audit.

A 30-day Azure hardening plan

Hardening goes faster in a fixed order than as one long list. This sequence removes the most risk first:

  1. Week 1: identity. Confirm MFA for every user through security defaults or Conditional Access, block legacy authentication, and create the two break-glass accounts.
  2. Week 2: public exposure. Turn off anonymous blob access, remove AllowAllWindowsAzureIps and wide SQL firewall ranges, and close RDP and SSH from the internet.
  3. Week 3: privilege and secrets. Cut subscription Owners to a few named people, move automation to managed identities, and turn on Key Vault purge protection.
  4. Week 4: lock it in. Turn on Defender for Cloud on every subscription, export the activity log with long retention, assign Azure Policy at management group scope, and start daily checks so drift shows up the day it happens.

Write down each change with the date and the reason; that record is the evidence an auditor asks for when testing access and change management.

✨ How Strac runs these checks every day

Strac connects to Azure through an app registration with the Reader role, granted with admin consent, and never changes your settings. It runs 34 Azure checks every day alongside 95 for AWS and 21 for Google Cloud. Each finding names the exact resource, explains why it matters and gives the fix steps. Fixed findings close on the next run, intentional exceptions go into a waiver register with a reason and a review date, and every daily result is saved as SOC 2, ISO 27001 and HIPAA evidence:

Strac Comply readiness dashboard with controls, evidence status and open findings
Azure findings sit next to the controls they prove.

Native tools such as Defender for Cloud are worth running too; the difference is that Strac covers all three clouds in one list, ties each finding to the control it proves, and sits in the same platform as secret scanning, dependency scanning and the AI pen test. Our CSPM tools comparison covers the options, and our GCP security best practices and AWS security checklist follow the same format. For the category itself, see what CSPM is. See Strac's cloud posture checks.

Run every Azure check daily, with the fix and the audit evidence attached.

Book a demo of Strac CSPM for Azure

🌶️ Spicy FAQs about Azure security best practices

What are the most important Azure security best practices?

Require MFA for every user through security defaults or Conditional Access, block anonymous access to storage accounts, remove the Allow Azure services rule and broad IP ranges from Azure SQL firewalls, close RDP and SSH to the internet, keep Owner roles to a few people, and turn on Defender for Cloud and long-term activity log retention.

Should I use security defaults or Conditional Access?

Security defaults are free and require MFA for everyone with sensible settings, which is right for most small tenants. Conditional Access needs Microsoft Entra ID P1 and lets you write your own policies, such as exceptions for break-glass accounts or stricter rules for admins. You use one or the other, not both.

Is MFA mandatory in Azure?

Increasingly, yes. Microsoft began enforcing MFA for Azure portal sign-ins in 2024 and extended it to Azure CLI, PowerShell, infrastructure-as-code tools and REST API create, update and delete operations from October 2025. Workload identities such as managed identities and service principals are not affected.

Are Azure storage accounts public by default?

No, not for new ones. Since late 2023, new storage accounts disallow anonymous blob access by default. Older accounts may still allow it, and a public network endpoint is still on by default, so check both settings on every account.

Is Microsoft Defender for Cloud free?

Its Foundational CSPM tier is free and provides recommendations and Secure Score. The paid Defender CSPM plan and workload protection plans add attack paths, regulatory compliance dashboards and threat protection. Microsoft notes that subscriptions created from October 27, 2026 start with Foundational CSPM off, so check it is enabled.

Customer story

“Don’t just alert on problems, fix them.”

Scott Roberts, Chief Information Security Officer, UiPath

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
More customer stories →
What are the most important Azure security best practices?
Should I use security defaults or Conditional Access?
Is MFA mandatory in Azure?
Are Azure storage accounts public by default?
Is Microsoft Defender for Cloud free?
Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.
Get compliant from $4,995

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon