Troubleshooting “AuthorizationFailure” Error When Accessing Azure Blob Storage from Azure CDN

Yash 25 Reputation points
2024-07-16T05:36:20.82+00:00

I’ve set up Azure Blob Storage container and connected with Azure CDN with Microsoft, and I’m trying to access blobs from my IP address through the CDN. However, I keep encountering an “AuthorizationFailure” error. Here are the steps I’ve taken:

  1. System Managed Identity Permissions:
    1. I granted the “Storage Blob Data Reader” role to the system managed identity of Azure CDN from Microsoft.
    2. The role is assigned at the container level (no role assignment on the storage account).
  2. CORS Rules:
    1. I configured CORS rules in the Azure CDN rules engine to allow requests from my domain and it's subdomains, or my IP Address only
  3. Error Message:
    1. When accessing the blobs, I receive the following error:
            <Error><script
      
  4. Troubleshooting Steps Taken:
    1. Verified system managed identity association with Azure CDN.
    2. Ensured the container permissions match the blob location.
    3. Checked CORS rules (although they shouldn’t directly impact system managed identity access).
    4. Verified network accessibility between CDN and storage.
  5. Next Steps:
    1. What else should I check to resolve this issue?
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,918 questions
Azure Content Delivery Network
0 comments No comments
{count} votes

Accepted answer
  1. Manu Philip 18,671 Reputation points MVP
    2024-07-16T07:38:29.49+00:00

    Hi,

    For a quick testing, enable the firewall and network rules as follows to enable from any network

    User's image

    If it works, you can add a firewall exception on the storage with the IP of the app service and by enabling the access from trusted networks as below

    User's image


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.