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 / How to call external a...
Power Apps
Answered

How to call external api which has disabled CORS?

(0) ShareShare
ReportReport
Posted on by 115

Hi, 

I think there are 4 ways to access external API as below:

 1, an Azure function triggered by a webhook

 2, use xrm.webapi.online.execute method

 3, use a custom connector in a power automate flow

 4, a plug-in attached to a custom action called from JavaScript

but if the API disabled CORS, seems only the custom connector in flow could access the API. but WHY?...

Will all other ways  encounter the CORS error, and why?...

 

THANK YOU !!!

I have the same question (0)
  • Verified answer
    ChrisPiasecki Profile Picture
    6,422 Most Valuable Professional on at

    Hi @sukie_y,

     

    It's important to understand that CORS is not a security feature, it's a browser feature that relaxes security.. If CORS is disabled on an external API, then only requests that originate from the same domain (same origin policy ) as the API can be made. This only applies to scripts (e.g. JavaScript) running in the browser). It does not apply in non-interactive server to server scenarios. 

     

    You should not run into a CORS error if calling the Web API from a Dataverse Plugin, Azure Function, or Power Automate flow. If you're trying to call it from a JavaScript web resource in Dataverse (which you should not be doing anyway if any credentials are being passed) then you'd experience a CORS error if CORS is disabled on the external API. 

     

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • Ethan.s Profile Picture
    115 on at

    Hi @ChrisPiasecki 
    Thank you for the explain of CORS !!

    That's what I have be confused.

    Thank you !

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard