Skip to main content

Notifications

Power Apps - Microsoft Dataverse
Suggested answer

Blank page when downloading a file from Dataverse

(1) ShareShare
ReportReport
Posted on by 2,274
My app is allowing users to download files from Dataverse.
 
It works well when the user is signed into what I believe is CRM dynamics, but when is not, the download opens a blank page.
 
Example: with this URL:
 
https://mydomain.crm4.dynamics.com/api/data/v9.2/pg_attachmtoses(fdfdsfae)/pg_anexo/$value
 
If the user opens https://mydomain.crm4.dynamics.com/ and signs in, he's able to download the files, but if the login cookie isn't present in the browser, he gets a blank page.
 
Is there a way to get around this?
 
Any help?
 
Thanks in advance!
 
 
  • WebPortal Profile Picture
    WebPortal 2,274 on at
    Blank page when downloading a file from Dataverse
    Hello all,
     
    Thanks for your support with this matter, it is becoming an important issue for multiple apps I've developed.
    If anyone is aware of more detailed documentation for a solution, I'd really appreciate.
     
    Thank you!
  • MichaelFP Profile Picture
    MichaelFP 1,575 on at
    Blank page when downloading a file from Dataverse
    Create a power automate that you can call by HTTP request of type get. 
     
    Retrieve the file and response with the file. 
  • Shashank Bhide Profile Picture
    Shashank Bhide 932 on at
    Blank page when downloading a file from Dataverse
    no easy solution if you don't have a developer on your side who knows how to connect to Dataverse using C# or power automate, one way is to create a function app/power automate which connects to Dataverse and downloads the file using the path you mentioned then streams that file's binary data over HTTP as response and your client browser will receive it as a downloaded file. 
  • Suggested answer
    MichaelFP Profile Picture
    MichaelFP 1,575 on at
    Blank page when downloading a file from Dataverse
    you are providing the URL as a link do download the file? If you are doing that it will always not work if the user is not logged in in the system.
     
    "https://mydomain.crm4.dynamics.com/api/data/v9.2"  it is a webapi that is required to be authenticated to make the request. So the user will always be authenticated to be able to retrieve. if your are not logged in you must send the OAuth authentication before do the request.
     
    This is not like a file inside a folder on a hosted website. that you just click and will return the binary. if you want to some similar i would recommend to user Azure Blog Storage for that.
     
     
    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as answer ✔️. This is help the community.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics