cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pradeepperi
Frequent Visitor

Cors Issues Accessing API

Hi,

 

I am facing issues in accessing an api from my PCF Control (calling the api from componentDidMount method). I am getting the below error message while calling the api. Surprisingly , this is not the error that occurs each time. Most of the time api call succeeeds and gets the data, but 20% of the api calls are failing with this error from the control. we are allowing ".dynamics.com" to send requests. Please note that this problem does not occur all the times, but pretty randomly some times ~20% times. 

 

Access to fetch at '*********' from origin '******' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

10 REPLIES 10

@a33ik The risk with that is that unless and until it's documented it could break at any point.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Users online (24,553)