Azure Front Door with Azure Storage Blobs

Artem Shaturskyi 135 Reputation points
2025-02-06T16:30:05.2733333+00:00

Hello!
We have an Azure Blob Storage account containing a large number of media files (.MP4). These files are manually organized into categorized folders under a single container. Our goal is to allow all corporate users to access the container and watch the media files directly in their browsers - no streaming or additional services, just simple playback.

I initially tried using Static Website Hosting with a pre-generated index.html, but generating SAS tokens for every file is not a feasible solution due to the large number of files.

I decided to implement Azure Front Door for the storage account, and it seems to work for file access, but I can't configure it to require user authentication.
How can I configure Azure Front Door to enforce Microsoft Entra ID authentication for accessing storage resources?

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,359 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 9,855 Reputation points
    2025-02-06T17:52:03.4633333+00:00

    Hello Artem Shaturskyi,

    Thanks for posting your question in the Microsoft Q&A forum.

    Azure Front Door doesn't natively support Microsoft Entra ID authentication for direct blob access. However, you can achieve this by using a combination of Azure Front Door, Azure Functions, and Azure Storage.

    • Create an Azure Function App: Develop an HTTP-triggered function that acts as a proxy between Front Door and Blob Storage and implement Microsoft Entra ID authentication in the function.
    • Configure Azure Front Door: Set up a backend pool pointing to your Azure Function App, then create routing rules to direct traffic to the function.
    • Implement authentication and authorization: Use Microsoft.Identity.Web library in your Azure Function to handle Microsoft Entra ID authentication, validate user tokens and permissions in the function.
    • Proxy requests to Blob Storage: Once authenticated, use the Azure Storage SDK in your function to retrieve the requested blob, stream the blob content back to the client through the function response.
    • Configure CORS: Set up CORS rules on your Storage account to allow requests from your Front Door endpoint.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

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.