Skip to main content

Notifications

Power Platform Community / Forums / Microsoft Dataverse / Blank page when downlo...
Microsoft Dataverse
Suggested answer

Blank page when downloading a file from Dataverse

Posted on by 2,252
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!
 
 
  • Suggested answer
    MichaelFP Profile Picture
    MichaelFP 1,174 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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard

Featured topics