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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sending HTTP Request f...
Power Apps
Answered

Sending HTTP Request from Model Driven App

(0) ShareShare
ReportReport
Posted on by 15

Hi All,

 

This is a very basic concept, so I'm surprised that I can't find any content on this, but how does on send an HTTP request to an external endpoint from within a model driven app using client-side scripting?

 

Both fetch and XMLHTTPRequest fail to get a response from a container app we have set up in azure.

 

I've been trying to find a solution, and it seems like content-security-policy might have something to do with it? I'm honestly lost. Essentially, we're trying to do something like fetch("https://www.google.com") based on a form event in a model driven app.

 

 

Categories:
I have the same question (0)
  • SebS Profile Picture
    4,867 Super User 2026 Season 2 on at
  • anaida Profile Picture
    15 on at

    Hi @SebS ,

     

    There were two points of conversation in that thread as far as I can tell:

     

    1. Calling a SOAP Web Service - this is not what I'm looking to do. Just trying to send HTTP request to an endpoint. I'm not sure if I'm performing a category error in saying that, please advise if I am.

     

    2. Using Power Automate - this is not a potential solution for us as the user needs to send a request then seamlessly choose from a collection of options sent in the response to send another request which would ultimately end the process.

     

    We've been able to use all sorts of other ES6 functionality built into the browser so far: I'm not sure what's special about using XMLHTTPRequest or Fetch? This resource seems to imply that it's possible. Is the problem with providing an external endpoint? If so, can I add it to some kind of whitelist? 

  • SebS Profile Picture
    4,867 Super User 2026 Season 2 on at

    @anaida 

     

    So far, I did not need to deal with a similar scenario to yours, and power automation was enough for me. Sorry, I could not be more helpful and Hope someone with more experience will be able to answer your question.

     

     

  • Verified answer
    anaida Profile Picture
    15 on at

    Found the solution, so posting here as a resource for others:

     

    fetch() and XMLHTTPRequest sent from the browser have CORS policy applied, which means the response from the server must explicitly allow the origin of your app and the headers you send by attaching: 

    access-control-allow-credentials, access-control-allow-origin, Access-Control-Allow-Headers as response headers.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard