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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.