Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17881

Error: No 'Access-Control-Allow-Origin' header is present on the requested resource

$
0
0

Hi Guys,

I am trying to get the access token in order to embed the Power BI report. When i fetch the token using AcquireTokenAsync in C# application it works fine. But when i try to get the access token in my javascript code it throws below error:

"Failed to load https://login.microsoftonline.com/common/oauth2/token: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:65159' is therefore not allowed access."

 

Can anyone kindly guide me on how to workaround this error in order to obtain access token in Javascript.

 

Prateek Raina


Viewing all articles
Browse latest Browse all 17881

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>