Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

How to access attachment in PowerApp that are stored in Blobstoragecontainer,using SAS token or ACL

Posted on by 102
  1. We have developed a PowerApp and set up a Blob storage container to store attachments.
  2. We can successfully save data (files or images) in the Blob storage container.
  3. However, when trying to view the saved attachments in PowerApps, we encounter the error message: 'Public access is not permitted on this storage account.'
    (Note: We have set the access level of the containers to 'Private'.)
  4. We understand that to access the storage with 'Private' settings, we need to generate a SAS token or set up ACL policies.

Could you please guide us on how to configure the SAS token in PowerApps or how to create ACL policies?

  • Suggested answer
    Ammar Zaied Profile Picture
    Ammar Zaied 97 on at
    How to access attachment in PowerApp that are stored in Blobstoragecontainer,using SAS token or ACL
    • Access to azure portal, your Azure Blob Storage account: 

      • Select Containers and choose the container where your files are stored.
      • Click on Shared access signature from the left panel.
      • Define the permissions you need (like Read if you only want to view the files).
      • Set the start and expiry times for the token.
      • Click Generate SAS token and URL.
    • In PowerApps:

      • You will use the generated Blob SAS URL to access files.
      • In PowerApps, modify the URL used to display or fetch the file by appending the SAS token at the end of the Blob URL

    One of the main constraints of using a SAS token is that you need to regenerate the URL periodically because the SAS token has an expiration time. This means that each time the token expires, you'll have to generate a new SAS URL to continue accessing the files.

    To avoid this manual process, you can create an API or Power Apps Custom Connector or power automate that dynamically generates a SAS token for your files on demand.
     
     
  • Suggested answer
    FLMike Profile Picture
    FLMike 29,361 on at
    How to access attachment in PowerApp that are stored in Blobstoragecontainer,using SAS token or ACL
    Hi,
     
    So you have 2 options
     
    1) do this in Power Automate and pass back the data
     
    Lol i had to laugh... because CoPilot Now generates the correct steps /cry harder.
     
    2) Use the HTTP(s) Connector or the HTTP Azure AD Connector in your app
     
    Just an FYI those are all premium connectors so they cost money.
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard