Power portal Power page and file storage

Nipuna Weerasinghe 21 Reputation points
2024-05-01T12:24:36.63+00:00

Hi, I m implementing Microsoft power portal Power page to share with B2C users. But I want the users to upload and download documents (multiple documents, videos, img, etc) from the source. What is the best file storage for this requirement. Thanks.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,481 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anand Prakash Yadav 6,465 Reputation points Microsoft Vendor
    2024-05-03T09:31:53.7466667+00:00

    Hello  Nipuna Weerasinghe,

    Thank you for posting your query here!

    As mentioned earlier, Azure Blob Storage is a good option for storing large amounts of unstructured data like documents, images, and videos. It provides high availability, high durability, and massive scalability for data objects. You can use Azure Blob Storage with Power Apps to allow users to upload and download files.

    I also thinking blob storage, but how easy enough B2C user to upload and download documents from blob? User required direct access to the containers in blob to upload documents manully, the power page app provides the link to the container. Initially I was thinking Sharepoint Online, but b2C won't get access, so can't use. Thanks.

    Direct access to Blob Storage for B2C users is not typically recommended due to security reasons. Instead, you can create an intermediary service, such as an API, that handles the file uploads and downloads. This service would have the necessary permissions to interact with Blob Storage.

    You can use Azure Active Directory (AAD) B2C for authentication.

    Implement Azure Functions to act as a middle layer between your Power Pages and Azure Blob Storage. These functions will handle the file uploads and downloads, ensuring that users do not have direct access to the storage, which secures your data.

    Use Shared Access Signatures (SAS) to give users temporary, secure access to the Blob Storage for uploading or downloading files without exposing your storage account keys. SAS tokens can be generated dynamically by Azure Functions.

    Use Azure Functions as APIs that your Power Pages application can call to perform upload and download operations.

    Implement file upload controls within Power Pages for users to select files. When a file is selected, trigger the corresponding API endpoint to upload the file to Blob Storage via Azure Functions.

    Similarly, for downloading documents from Azure Blob Storage, Azure Functions will generate SAS-enabled URLs for the files stored in Blob Storage. These URLs contain SAS tokens that grant temporary access to the files. Provide these URLs as download links within your Power Pages application, allowing users to securely download the files they need.

    You may also refer the following post on similar query: https://stackoverflow.com/questions/69788250/how-to-authorize-azure-b2c-user-to-read-blob-storage

    Do let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Amrinder Singh 2,770 Reputation points Microsoft Employee
    2024-05-01T17:31:08.7766667+00:00

    Hi Nipuna Weerasinghe - Thanks for reaching out.

    From Storage side, you can start exploring blob storage which is optimized for storing massive amounts of unstructured data. Blob Storage is designed for:

    • Serving images or documents directly to a browser.
    • Storing files for distributed access.
    • Streaming video and audio.
    • Writing to log files.
    • Storing data for backup and restore, disaster recovery, and archiving.
    • Storing data for analysis by an on-premises or Azure-hosted service

    https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction

    There appears to be a blob storage connector to connect from the power platform so you can try setting up small setup to verify if that suffice the requirement and then capitalize ahead.

    https://learn.microsoft.com/en-us/connectors/

    https://learn.microsoft.com/en-us/connectors/azureblob/

    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.