Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

download a file using its base64 string

(0) ShareShare
ReportReport
Posted on by
Hello everyone, I am having trouble with a canvas app I need to implement. 
I want to implement the following functionality:

1. Canvas app that is embedded inside Dynamics 365 model driven app, which retrieves some files from azure blob storage and downloads them.
2. I can only use Microsoft Entra ID authentication in my app for authenticating Azure Blob Storage, and I say this because the connector for Azure Blob Storage has some limitations, and one in particular is that I cannot use AzureBlobStorage.CreateShareLinkByPath(), which is exactly what I needed but is not possible.

What I am currently trying is to also connect a flow that runs when I click a button on the app, in the flow I am making HTTP call using azure blob storage API, and I actually get the file content I need in the flow, as shown in the screen shot below:



The file is in the filecontent variable which I am returning to the canvas app.

For context this is the actual variable. 
 
{
  "filecontent""UEsDBBQABgAIAAAAIQDfpNJsWgEAACAFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAA......
}
The string is actually huge I am only inputting the start of it.

After I return this is my app, I was trying to download it:

1. I tried Set(downloadLink, "data:application/octet-stream;base64," & filecontent), and then Launch(downloadLink)
2. I also tried Launching the filecontent as it is.

I also tried the Download function as well, but I got an error saying Invalid URL.

What I have noticed is that the filecontent variable that is returned from my flow, is nothing like the string I get when checking the flowruns (as shown in the screenshot above)
What I get in the canvas app is this: 
appres://blobmanager/4365b7f839f94989a9e6e10d68fe0572/1
I am not sure if I can use this to download the file. 

Any help is appreciated. 
 
  • Srinivas Kadamati Profile Picture
    3,131 Super User 2025 Season 1 on at
    download a file using its base64 string
    Hi,
     
    First, validate that the Base64 string you're getting is correct. You can search for "Base64 to file" on Bing, then paste the entire Base64 string to check if it converts properly.
    If the file is very large, it's better to use Power Automate "Create file" action, and then use SharePoint actions to download the file.
     
    Check below link for your reference
     
     
     
    If I have answered your question, please mark it as the Answered. If you like my response, please give it a Like.
    Regards,
    Srini
     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1