The Azure Storage Firewall Trap: Why an Authorised Application Still Receives “403 Forbidden”

Get In Touch

Related Posts

The Azure Storage Firewall Trap: Why an Authorised Application Still Receives “403 Forbidden”

Azure Storage firewall rules are the reason an application with the right role, a valid identity and a freshly issued token can still receive a 403 Forbidden from its own storage account. The ticket usually sounds like this: the app was reading blobs on Friday, someone tightened the network settings, and on Monday every call fails. The managed identity has Storage Blob Data Contributor. Nothing in Microsoft Entra ID has changed. Yet the error says the request is not authorised to perform this operation.

The mistake is assuming 403 means permissions. In this case it rarely does. This guide explains what the Azure Storage firewall actually checks, how to read the error code, the seven traps behind most of these outages, and a repeatable method to find the cause quickly.

What the Azure Storage Firewall Actually Checks

Access to Azure Storage passes through two independent layers. The first is the network layer, where the Azure Storage firewall decides whether the request is allowed to arrive at all, based on its source IP address, virtual network subnet or the Azure service it came from. The second is the authorisation layer, where Microsoft Entra ID role assignments, shared access signatures or account keys decide what the caller may do. Microsoft states that clients from allowed sources must also meet the authorisation requirements of the account, so both layers have to pass. You can read the details in Microsoft’s storage network security documentation.

Here is the part that surprises people. The network layer runs first. If the Azure Storage firewall rejects the source, the role assignment is never evaluated, so granting more permissions cannot fix it. Another detail matters just as much: storage firewall rules apply to the public endpoint only, and a private endpoint needs no firewall rule at all.

Azure Storage firewall diagram showing an authorised app blocked at the network layer before the role check

Reading the 403: AuthorizationFailure vs AuthorizationPermissionMismatch

The error code tells you which layer to investigate before you touch a single setting. Microsoft documents these codes in its guide to troubleshooting Azure Blob Storage 403 errors.

Error code What it usually means Where to look first
AuthorizationFailure Blocked before authorisation: firewall, IP or subnet restrictions, public access disabled Networking blade, caller IP, DNS, private endpoint
AuthorizationPermissionMismatch Network is fine, but the role or SAS permission is missing Role assignment and scope, SAS permissions
AuthorizationServiceMismatch SAS token was created for a different storage service The ss field of the SAS token

 

If you see AuthorizationFailure and the identity is correct, stop editing roles. Go straight to the network path.

Seven Azure Storage Firewall Traps That Block Authorised Applications

1. The source IP is not the address you allowed

Teams add the office or build-server IP to the allow list, but the request leaves through a NAT gateway, a proxy, Azure Firewall or a platform that rotates outbound addresses. The Azure Storage firewall sees the real egress address, not the one you expected. Confirm it from the storage logs rather than guessing.

2. IP rules used for services in the same Azure region

IP network rules are designed for public internet addresses. Azure services running in the same region as the storage account often connect over internal Azure addressing, so an IP rule for their published outbound addresses may not help. For same-region Azure workloads, use a virtual network rule with a service endpoint, or a private endpoint.

3. The service endpoint or virtual network rule is on the wrong subnet

A virtual network rule only works if the subnet the application actually uses has the Microsoft.Storage service endpoint enabled and has been added to the account. With App Service or Functions, that means the integration subnet, not the main workload subnet. For accounts in another region, the cross-region Microsoft.Storage.Global endpoint is the one to check.

4. The private endpoint exists, but DNS still points to the public address

This is the most common trap in hub-and-spoke designs. The private endpoint is deployed and approved, but the client still resolves the storage account name to its public IP because the private DNS zone (privatelink.blob.core.windows.net for blobs) is not linked to the client’s network, or on-premises DNS does not forward the zone. Traffic then arrives at the public endpoint, where the Azure Storage firewall blocks it.

5. The trusted services exception is misunderstood

The setting “Allow Azure services on the trusted services list” does not mean every Azure service is allowed. It covers only specific services, and each one still needs its own role assignment. For other services, a resource instance rule is the safer option, because it admits one named resource rather than a whole category.

6. The role is real, but it is the wrong kind of role

Owner and Contributor on the storage account manage the resource, but they do not grant access to blob data. Data access needs a data-plane role such as Storage Blob Data Reader or Contributor, assigned at the right scope. Shared key access being disabled, or a SAS token restricted to a different IP range, produces similar symptoms. If you are tidying roles at the same time, our posts on the managed identity lifecycle gap and permanent privilege trap cover why over-broad access builds up.

7. The human tool is blocked, not the application

An engineer opens the Azure portal or Storage Explorer from a laptop that is not on the allow list and sees “not authorised”, even as an Owner. That tells you the Azure Storage firewall is working, and it can send people chasing the wrong problem. Test from the same network position as the application.

A Step-by-Step Azure Storage Firewall 403 Troubleshooting Method

Work through these steps in order. Each one rules out a layer before you change anything.

Step Check What it tells you
1. Read the error code Response body or client log AuthorizationFailure points to the network layer
2. Check public access Storage account, Networking Enabled from selected networks, or disabled, explains most blocks
3. Find the real caller StorageBlobLogs, CallerIpAddress The address in the log differs from the one you allowed
4. Test DNS nslookup <account>.blob.core.windows.net Private endpoint users should see a private IP
5. Check subnet rules Subnet service endpoints, account virtual network rules Service endpoint missing, or rule on the wrong subnet
6. Check data roles az role assignment list –assignee <id> Only a management role, or wrong scope
7. Retest from the app host Same network position as the application Passes there but fails elsewhere, so the firewall works as designed

 

Start by reading the current network configuration:

az storage account show –name <account> –resource-group <rg> \

–query “{publicAccess:publicNetworkAccess, defaultAction:networkRuleSet.defaultAction, bypass:networkRuleSet.bypass}”

 

az storage account network-rule list –account-name <account> –resource-group <rg>

 

Then find the address Azure Storage actually saw. This query needs diagnostic settings enabled on the account (see our guide on the Azure resource ownership gap for why nobody turns them on until the outage):

StorageBlobLogs

| where TimeGenerated > ago(1h) and StatusCode == 403

| project TimeGenerated, OperationName, CallerIpAddress, AuthenticationType, StatusText, Uri

| order by TimeGenerated desc

 

If the caller address is not in your rules, you have found the gap. To admit a subnet properly, enable the service endpoint and then add the rule. Note that the first command replaces the subnet’s existing endpoint list, so include any others it already uses.

az network vnet subnet update –resource-group <rg> –vnet-name <vnet> \

–name <subnet> –service-endpoints Microsoft.Storage

 

az storage account network-rule add –account-name <account> \

–resource-group <rg> –vnet-name <vnet> –subnet <subnet>

 

Avoid the temptation to switch the account to “all networks” to see if the error disappears. It will, but you have then removed the control you were trying to debug, and in production that is an incident of its own.

Real-World Scenario: The Function App That Stopped Reading Blobs

Here is an illustrative scenario. A Sydney team hardens a storage account by moving it from all networks to selected networks. Their Function App, running with a managed identity and the correct data role, starts returning 403 AuthorizationFailure. The engineer checks the role assignment first, and it is perfect. Next comes an IP rule for the app’s published outbound addresses, and the errors continue.

The diagnostic logs finally show a caller address that is not on any published list. The app and the account sit in the same region, so IP rules were the wrong tool. The fix is regional virtual network integration for the app, the Microsoft.Storage service endpoint on the integration subnet and a virtual network rule on the account. After a few minutes the app reads blobs again, with no change to any role.

Three hours were lost because everyone treated a network problem as a permissions problem. The error code had pointed at the network from the first minute.

Why Azure Storage Firewall Skills Matter for Cloud Careers in Australia

This topic sits right inside certification content. Configuring Azure Storage firewalls and virtual networks is part of the Azure Administrator skills measured in AZ-104, securing storage network access features in AZ-500, and the access design decisions behind AZ-305. It is also exactly the kind of fault that separates engineers who memorise settings from engineers who can diagnose a live outage.

Across Australia the pattern repeats with local flavour. Sydney and Melbourne have large concentrations of financial services, consulting firms and managed service providers locking down storage accounts. Brisbane and Perth teams often run data platforms for resources, logistics and energy workloads. In Adelaide, many organisations are moving their first workloads into Azure and meeting these controls for the first time. In Canberra, government projects tend to require private connectivity and strong documentation by default.

If you want to practise this with guided labs, start with AZ-900 Azure Fundamentals for the cloud basics, then build the skills in AZ-104 Azure Administrator. Security-focused learners can follow with AZ-500 Azure Security Technologies, while networking specialists should look at AZ-700 Azure Networking Solutions and architects at AZ-305. You can see every pathway on our Azure certifications page, and Microsoft publishes a free learning module on Azure Storage network security to go with your practice.

Prefer to learn in your own city? Explore Azure training in Sydney, Melbourne, Brisbane, Perth, Adelaide and Canberra. Our courses are delivered with Logitrain, an Australian IT training provider, and security-minded learners can also review the Logitrain cybersecurity courses.

Azure Storage Firewall FAQs

What does 403 AuthorizationFailure mean in Azure Storage?

It means the request was blocked before authorisation, usually by network settings such as the Azure Storage firewall, disabled public access or a private endpoint misconfiguration. It is different from AuthorizationPermissionMismatch, which points to missing permissions.

Why do I get 403 Forbidden when I already have Storage Blob Data Contributor?

The Azure Storage firewall is evaluated first. If your request comes from a source that is not allowed, the role assignment is never checked. Look at the caller IP, subnet and DNS resolution rather than adding more roles.

Do Azure Storage firewall rules apply to private endpoints?

No. Firewall rules apply to the public endpoint only. Traffic through a private endpoint does not need a firewall rule, but it does depend on correct private DNS so that clients actually use the private address.

What is the trusted services exception in Azure Storage?

It is a setting that lets specific Azure platform services reach a firewalled storage account. It does not cover every Azure service, and the service still needs the right role assignment. Resource instance rules offer tighter control for supported services.

Why does the Azure portal say I am not authorised to view blobs?

If your laptop or network is not allowed by the Azure Storage firewall, the portal cannot list data even for an Owner. Add your approved address, connect from an allowed network or use a private connection.

How long do Azure Storage firewall changes take to apply?

Changes usually take effect within a few minutes. Wait briefly before retesting, then confirm with the diagnostic logs rather than assuming the rule did not work.

Is the Azure Storage firewall covered in AZ-104?

Yes. Configuring storage firewalls and virtual networks is part of the Azure Administrator skills outline, so you should know virtual network rules, IP rules, service endpoints and private endpoints.

Stop Editing Roles and Start Tracing the Network Path

When an authorised application gets a 403, read the error code first, find the real caller address second, and check the Azure Storage firewall, DNS and subnet rules third. Roles come last. Most cases are solved in under thirty minutes once you know the order.

Want to build this troubleshooting instinct with hands-on Azure labs and an instructor beside you? Enquire about Azure training today, or read more cloud operations guides on the Azure certifications blog.

Scroll to Top