cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Users online (6,402)