Back to all posts

cat posts/azure-defaults-that-are-wrong-once-you-have-auditors.md --category "Security & Compliance" --views 25

Azure defaults that are wrong once you have auditors

Azure defaults are tuned so a first deployment succeeds, which is the right call for a newcomer and the wrong one for a tenant with regulators and more than one engineer. Nine current defaults verified on Microsoft Learn, from Foundry model deployments that upgrade themselves to resource logs that are never collected, plus the five Microsoft has already fixed.

  • --author By Falak Mahmood
  • --date November 17, 2026
  • --read 16 min read
  • --views 25 views

Create an Azure SQL logical server in the portal today and the checkbox marked Allow Azure services and resources to access this server is unchecked. Microsoft's documentation says so, and says what happens when you tick it: the server "allows communications from all resources inside the Azure boundary, regardless of whether they are part of your subscription." Azure has quietly hardened a long list of defaults, and that one is on the list. Which makes the defaults that have not moved more interesting, not less.

Everything below was verified against current Microsoft Learn documentation in November 2026, and anything Microsoft already fixed sits in the "already fixed" section rather than being dressed up as a finding. For each live item: the default, why it plausibly exists, why it is wrong for a tenant with regulators and more than one engineer, and the setting to change.

Why these defaults exist at all

A cloud platform has one shot at a developer's first deployment. If the quickstart fails because logging was not configured, that developer goes elsewhere. So the defaults are tuned for one engineer with one subscription and no governance, and they are tuned to succeed. That is a defensible product decision, and Microsoft publishes the recommended hardening alongside every default below.

The problem is what happens afterwards. Nobody revisits a working deployment. The resource a quickstart created in 2023 is still running on quickstart settings, and now it is in scope for an audit.

1. A Foundry model deployment will change versions without you

This is the one that matters most, because it changes behaviour under a running agent with no code change and no deployment event on your side.

An Azure OpenAI model deployment in Microsoft Foundry carries a versionUpgradeOption property with three values: OnceNewDefaultVersionAvailable, OnceCurrentVersionExpired and NoAutoUpgrade. The documentation is explicit about what happens when nobody sets it: "null is equivalent to OnceCurrentVersionExpired." A deployment created without that property upgrades itself to whatever the default version is at retirement. There is no inert default here. Doing nothing is a choice to be upgraded on Microsoft's schedule.

Choose OnceNewDefaultVersionAvailable and the deployment "automatically upgrades to the default version within two weeks of that designation change being made." Microsoft notifies customers at least two weeks before a version becomes the default. Two weeks is fair notice for a product team that is watching. It is not fair notice for a regulated change process, and the notification goes to subscription owners and contributors rather than to the team that owns the prompt.

Regional availability does not protect you either: "even in cases where the latest model version isn't yet available in a region, Azure automatically upgrades deployments during the scheduled upgrade window." Azure deploys the new version into the region in order to perform the upgrade.

For early exploration, Microsoft's own advice is to leave auto-update on, and that advice is sound. For anything with an evaluation suite behind it, pin the version and own the upgrade. Note the gap in the tooling: the Azure CLI can read versionUpgradeOption but, per the docs, "it's currently not possible to update the version upgrade option." Use PowerShell or REST.

# Pin a Foundry / Azure OpenAI deployment. Azure CLI cannot write this property.
$d = Get-AzCognitiveServicesAccountDeployment `
  -ResourceGroupName rg-ai -AccountName aoai-prod -Name gpt-chat

$d.Properties.VersionUpgradeOption   # empty means null, i.e. upgrade at expiry

$d.Properties.VersionUpgradeOption = "NoAutoUpgrade"
New-AzCognitiveServicesAccountDeployment `
  -ResourceGroupName rg-ai -AccountName aoai-prod -Name gpt-chat `
  -Properties $d.Properties -Sku $d.Sku

Pinning moves the risk rather than removing it. A deployment set to NoAutoUpgrade "stops accepting requests and returns errors after the model is retired," so pinning obliges you to track the retirement tables. That is the trade: a date you control against a behaviour change you do not. We build that tracking into the delivery pipeline on Azure OpenAI integration work, because the alternative is hearing about it from a user.

2. Resource logs are off, and the activity log forgets after 90 days

Azure Monitor documents three sources with three behaviours. Platform metrics and the activity log are "automatically collected without configuration." Resource logs "aren't collected by default. Create a diagnostic setting to collect resource logs." Resource logs are the data plane: key vault secret reads, database requests, storage operations. Without a diagnostic setting, none of it is recorded anywhere.

The activity log is better but bounded. "Azure retains activity log events for 90 days and then deletes them." It also carries a limitation that surfaces mid-incident: the activity log "isn't an authentication or authorization audit log," and requests rejected by Resource Manager during authentication or authorization "don't generate Activity Log entries." Failed control-plane access attempts are not there.

Why the default exists is obvious enough. Logs cost money, and a quickstart cannot assume you have a Log Analytics workspace. For a production tenant this is the default most likely to turn a manageable incident into an unanswerable one. Deploy diagnostic settings through policy at subscription scope rather than per resource by hand, and send the activity log somewhere with retention past 90 days.

3. Storage accounts still accept the account key

Here the default is encoded as an absence. "The AllowSharedKeyAccess property of a storage account is not set by default and does not return a value until you explicitly set it. The storage account permits requests that are authorized with Shared Key when the property value is null or when it is true." An account nobody configured accepts the account key, which is a bearer credential to all data in the account with no identity attached to it in any log.

The compliance consequence is sharper than teams expect: "To protect an Azure Storage account with Microsoft Entra Conditional Access policies, you must disallow Shared Key authorization for the storage account." Conditional Access is the control most Swedish enterprises point at during an access review. It does not apply to an account that still allows shared key.

Disabling it breaks things in predictable places. Service and account SAS tokens are rejected, while a user delegation SAS keeps working because Entra ID authorizes it. Azure Files access from the portal and Cloud Shell's own file share both depend on shared key. Measure first: the Transactions metric filtered on Authentication gives volume, and StorageBlobLogs gives the callers.

4. The minimum TLS version depends on how the account was created

This is the clearest case of portal defaults and API defaults diverging. "When you create a storage account with the Azure portal, the minimum TLS version is set to 1.2 by default. When creating a storage account using PowerShell, Azure CLI, or an Azure Resource Manager template, the MinimumTlsVersion property is not set by default and doesn't return a value until you explicitly configure it." When it is unset, "the storage account permits requests sent with TLS version 1.0 or greater."

Read that against how production actually gets built. The portal, used for experiments, gets the safe default. Bicep and Terraform, used for the regulated workload, get the permissive one unless the author typed the property. The accounts in your tenant with no TLS floor are disproportionately the ones your own pipeline deployed.

Azure Storage now supports only TLS 1.2 and 1.3 on the wire, so real exposure is narrower than it looks. Audit exposure is not: an unset property shows as null in Resource Graph, and null is not evidence of a control.

5. Key Vault soft delete is mandatory, purge protection is not

These two get conflated constantly, and only one is a gap. "When creating a new key vault, soft-delete is on by default. Once soft-delete is enabled on a key vault, it can't be disabled." That half is settled.

Purge protection is a separate setting: "Purge protection is an optional Key Vault behavior and is not enabled by default." Without it, a principal holding purge permission can permanently destroy a soft-deleted vault or key immediately instead of waiting out the retention window. Microsoft notes that most Azure services integrating with Key Vault, Storage included, require purge protection to prevent data loss.

Why it is optional is reasonable: it is close to irreversible, and a name created by mistake becomes unusable for up to 90 days. Two specifics to plan around. The retention interval "can only be configured during key vault creation and can't be changed afterwards." And soft-deleting a vault destroys what sits around it: RBAC role assignments and Event Grid subscriptions are deleted, and recovering the vault does not restore them. Enable purge protection on any vault holding encryption keys.

6. AKS ships with a non-auditable admin path

Microsoft's wording here is unusually direct: "When you deploy an AKS cluster, local accounts are enabled by default. Even when you enable RBAC or Microsoft Entra integration, --admin access still exists as a non-auditable backdoor option."

That is the whole problem. A cluster can pass an Entra integration review and still hand a static admin kubeconfig to anyone with permission to call az aks get-credentials --admin, and actions taken with that credential carry no user identity into the cluster audit trail. For a NIS2 entity that has told a supervisor it enforces least privilege on container platforms, an assessor finds this by asking one question.

Disabling local accounts on an existing cluster has a step people miss. After disabling, where users might have authenticated with local accounts, "the administrator must rotate the cluster certificates to revoke certificates they might have had access to." Disabling alone does not invalidate credentials already issued. On a new cluster, no rotation is needed.

Three Entra ID tenant defaults sit together, and the third is new enough that most tenants have never looked at it. "By default in Microsoft Entra ID, all users can register applications and manage all aspects of applications they create. They are also able to create an agent identity blueprint, create agent identities of those agents, and manage all aspects of the agents they create. Everyone also has the ability to consent to apps and agents accessing company data on their behalf."

On consent: "By default, all users are allowed to consent to applications for permissions that don't require administrator consent." High-impact permissions still need an admin, and Microsoft recommends restricting user consent to applications from a verified publisher using the built-in microsoft-user-default-low policy.

The default keeps developers unblocked, and it is what makes self-service work in a small company. In a tenant with a data protection officer it produces three findings at once: unmanaged service principals whose credentials nobody rotates, a consent-phishing path into mailboxes and files, and a population of agent identities nobody has inventoried. Set the switches to No under Entra ID > Users > User settings, assign the Application Developer role where it is needed, and enable the admin consent workflow so the restriction does not just become a ticket queue.

8. A Cosmos DB account with no firewall rules accepts everything

Straight from the Private Link documentation: "If you don't configure any firewall rules, then by default, all traffic can access an Azure Cosmos DB account." Authentication is still required, so this is reachability rather than an open database. It still means your production data store is addressable from the internet until someone says otherwise.

Adding a private endpoint after creation leaves the account reachable from public traffic until that endpoint is approved, so set publicNetworkAccess to Disabled at creation, where it "takes precedence over any IP or virtual network rule." One further trap: if you never configured public traffic or a service endpoint and your approved private endpoints are later rejected or deleted, "the account is open to the entire network unless PublicNetworkAccess is set to Disabled." Private endpoints alone are not a closed door.

The setting that is not a default but is in your tenant anyway

The 0.0.0.0 firewall rule on database servers deserves a mention precisely because it is no longer a default. For Azure SQL: "By default, during creation of a new logical server from the Azure portal, Allow Azure services and resources to access this server is unchecked and not enabled." For PostgreSQL flexible server with public access: "By default, no IP addresses are allowed."

It gets enabled anyway, because it is the fastest way to make a failing connection work. What it does is add a server-level firewall rule with start and end IP address 0.0.0.0, and Microsoft is blunt about the scope. On PostgreSQL it "configures the firewall to allow all connections from Azure, including connections from the subscriptions of other customers." Engineers read the label as "only Azure, so only us." It means any tenant in Azure.

Microsoft documents the way out for the features that genuinely needed it: Import and Export can run via SqlPackage from an Azure VM, and Data Sync works with explicit firewall entries generated from the SQL service tag for the hub region. Go look for the rule rather than assuming the current default protected you.

Microsoft already fixed these

A hardening list that recycles solved problems is worse than no list, because it teaches people to ignore the live items. These are documented on Learn today as safe defaults, and claiming otherwise in a review would be wrong.

  • Blob anonymous (public) access. "By default, anonymous access to your blob data is always prohibited. The default configuration for an Azure Resource Manager storage account prohibits users from configuring anonymous access to containers and blobs."
  • Key Vault soft delete. On by default for new vaults and impossible to disable once enabled. Only purge protection remains opt-in.
  • App Service SCM and FTP basic authentication. "Basic authentication is less secure than other authentication methods and is disabled by default for new apps." The portal creation wizard also switches continuous deployment to a user-assigned identity with OpenID Connect when basic auth is disabled.
  • The database 0.0.0.0 rule. Unchecked by default in the Azure SQL portal flow, as above.
  • Portal-created storage accounts and TLS. Minimum TLS version 1.2 by default. Only the API and template path is unset.

The practical reading is not that the problem went away. Your tenant has two populations of resources, and the ones created before a default changed never moved. New defaults are not retroactive.

Which of these become findings under Swedish and EU rules

The Swedish cybersäkerhetslagen, implementing NIS2, took effect on 15 January 2026. It changed who answers for these settings and how fast. Below is how we triage the list for a Swedish entity in scope, weighted by how likely each is to come up in a real assessment rather than how severe it looks on a slide.

Default Where it bites Audit finding?
Resource logs off, 90-day activity log NIS2 incident handling and reporting deadlines; GDPR Article 33 Yes, and usually the first one
AKS local accounts and admin kubeconfig NIS2 access control; attribution of administrative action Yes, Microsoft's own wording says non-auditable
Storage shared key enabled GDPR Article 32 access control; blocks Conditional Access entirely Yes, if the account holds personal data
Entra app registration, consent, agent blueprints GDPR processor inventory; NIS2 supply chain; unlisted agent identities Yes, as an inventory gap
Foundry model version auto-upgrade AI Act record-keeping and change control; validation evidence goes stale silently Likely, and hardest to retrofit
Database 0.0.0.0 rule, Cosmos public access NIS2 network segmentation; limiting exposure of personal data Yes, and easy for an assessor to verify
Key Vault purge protection off Availability and integrity of cryptographic material Observation, unless those keys protect customer data
Unset minimum TLS on API-created accounts Evidence of encryption in transit Observation, since the service now negotiates only 1.2 and 1.3

The pattern is worth naming. The findings that hurt are not the ones where something is open to the internet. They are the ones where you cannot produce evidence: no resource logs, no attribution for admin actions, no inventory of which identities exist, no record of which model version answered a customer in March. A regulator asking for evidence is a much harder conversation than a scanner flagging a port.

The Foundry item earns one more line in an AI Act context. If your validation evidence names a model version and the deployment has since upgraded itself, your documentation describes a system you are no longer running.

The change list

Verified commands for the settings above. Check each against the compatibility notes in the linked docs before running it across a tenant, particularly shared key and local accounts.

# Storage: require Entra ID, set a TLS floor
az storage account update -n <account> -g <rg> --allow-shared-key-access false
az storage account update -n <account> -g <rg> --min-tls-version TLS1_2

# Key Vault: purge protection (irreversible; retention is fixed at creation)
az keyvault update -n <vault> -g <rg> --enable-purge-protection true

# AKS: remove the admin backdoor, then rotate certificates on an existing cluster
az aks update -g <rg> -n <cluster> --disable-local-accounts

# App Service: confirm basic auth is off on older apps
az resource update -g <rg> --name scm --namespace Microsoft.Web \
  --resource-type basicPublishingCredentialsPolicies --parent sites/<app> \
  --set properties.allow=false

# Audit trail: one diagnostic setting per resource, ideally deployed by policy
az monitor diagnostic-settings create --name audit-to-law \
  --resource <resource-id> \
  --logs '[{"categoryGroup":"audit","enabled":true}]' \
  --workspace <law-resource-id>

Two things do not belong in a CLI list. The Entra tenant switches live in the admin center under Users > User settings and Enterprise apps > Consent and permissions, and they are tenant-wide, so brief the people they will block before flipping them. And the Foundry version policy needs PowerShell or REST, because the CLI cannot write it.

Preparing an Azure tenant for a NIS2 or ISO assessment? We review existing subscriptions against current Microsoft baselines, separate the real gaps from the ones Microsoft already closed, and deliver the policy set that keeps them closed.

See our Azure cloud and governance services →

subscribe # the AI news that matters, minus the noise

Book a Call

Sources

Tags

Related posts