Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
luojiandan_bi
Helper I
Helper I

'Access-Control-Allow-Origin'

I need to get data from url,but get error:

```javascript

Access to XMLHttpRequest at 'https://gallerybox.makeapie.com/asset/get/s/data-1592366734603-Z-iQwIHJk.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

```

what's wrong with me?

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @luojiandan_bi,

Visuals have their domain removed by the main window so that they are sandboxed. One of the effects of this is that if you're attending to load data from an external URL and this site does not allow requests from an empty domain, they are blocked by your browser. This is a common use case for creators in the HTML Content visual, so I've written up a short overview here. This section and the one below it on CORS are worth understanding if you're developing visuals in Power BI - plus the linked articles that detail it further - as these cannot be overcome through conventional means.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
abanafa
New Member

I'm having the same problem did you find a solution?

luojiandan_bi
Helper I
Helper I

@dm-p 

thanks a lot,very useful replay.

dm-p
Super User
Super User

Hi @luojiandan_bi,

Visuals have their domain removed by the main window so that they are sandboxed. One of the effects of this is that if you're attending to load data from an external URL and this site does not allow requests from an empty domain, they are blocked by your browser. This is a common use case for creators in the HTML Content visual, so I've written up a short overview here. This section and the one below it on CORS are worth understanding if you're developing visuals in Power BI - plus the linked articles that detail it further - as these cannot be overcome through conventional means.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.