web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Log in required to lau...
Power Apps
Suggested Answer

Log in required to launch Data Verse Attachments

(1) ShareShare
ReportReport
Posted on by 257
in power apps I'm using the Data Verse as the backend for storing attachments/documents.  I have a button that will allow me to launch the attachment directly from the data verse, however if I'm starting in a new browser or a private browser, I get a 401 error (seen in dev tools).  
But if i first log into Microsoft dynamics first, then try button it works.  I've tried this on multiple browsers, in chrome it prompts me to save to a specific location, in edge it will just download it.  My company does use SSO and Intune, so we are usually on company computers that are connected to our tenant.
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 on at
    Sorry, what is the question that you are asking?
  • kilaj1 Profile Picture
    257 on at
    oo sorry yeah, I'm trying to figure out why its forcing me to log into MS dynamics before allowing me to download/launch the attachments and is there a way to bypass this.  form a user experience when they click this button to download/launch it, it actually takes them to a page that says "this page isn't working"
     
    If i launch the ms dynamics url for that environment then click the button it works without issue.  It looks like a browser related issue, cookie handling maybe?
  • Suggested answer
    stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Hi @kilaj1,
    In environments where Single Sign-On (SSO) is used, your regular company browser has already obtained the necessary tokens by logging into one Microsoft app. In private sessions, you need to trigger the auth flow again for the tokens to be available. Different browsers (e.g., Chrome vs. Edge) may handle or prompt for authentication differently due to their native integration with enterprise SSO setups.
    you can think it like this:
    when you click the button in chrome for example, you trigger a HTTP GET method,
    but your GET doesn't have valid token.
    if cannot avoid that, unless you build the logic with the click event (post to get the token, then pass it to get). you have to register app in Azure AD to make that work.
     
     
  • kilaj1 Profile Picture
    257 on at
    Thanks for the response, I was wondering about that...hoped there was a simpler solution.  Will need to dig up some documentation on getting this done.
     
    Will try it and let you know.
     
    Thanks again!
  • kilaj1 Profile Picture
    257 on at
    @stampcoin one thing I will note however, even when users are logged in with SSO to say edge and they can work away in SPO and the power app, dynamics still needs a separate "log in". and that log in is in the form of just going to the dynamics site, that then auto logs in based on the SSO session.
  • stampcoin Profile Picture
    5,058 Super User 2025 Season 2 on at
    Hi @kilaj1,
    Dynamic can have separated session settings.
    I used python script for myself to get data from Dynamics365,
    I don't need to logon every time.
    1.  Register app in AAD.
    2. go to your dataverse environment/settings.
    3. create Applications users ( you will see your registered app when you do this).
    4. once you have TENANTID, CLIENTID,CLIENTSECRET, you can build your stuff.
    good luck.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard