User Profile
rpalexf
Regular Visitor
Joined 9 years ago
User Widgets
Contributions
CORS error when viewing Published PowerBI Report
Hi, I posted this issue in the forums and it was suggested that this be logged here; http://community.powerbi.com/t5/Developer/CORS-error-when-viewing-Published-PowerBI-Report/m-p/81461#M2886 We are planning to embed PowerBI in an Angular2 app and have started publishing reports using the "Publish to Web" function. When we load just the published url in the browser (eg. https://app.powerbi.com/view?r=eyJrIjoiM2QwOGU3YmMtMjlkNC....) we receive CORS errors in the browser. The errors displayed are purely from the PowerBI site with no extra embedding used. "XMLHttpRequest cannot load https://wabi-south-east-asia-redirect.analysis.windows.net/powerbi/metadata/models. Request header field X-PowerBI-ResourceKey is not allowed by Access-Control-Allow-Headers in preflight response." These also occur multiple times after the load and sometimes causes the report to crash and then reload. Is this an issue with the report or configuration we are using, or is this a known issue? Thanks in advance for your time, Alex202Views0likes2CommentsRe: CORS error when viewing Published PowerBI Report
Thanks for the reponse. I just tried your url in my browser and I get a CORS error in your URL. Failed to load resource: the server responded with a status of 404 (Resource Not Found) XMLHttpRequest cannot load https://df-msit-scus-api.analysis.windows.net/powerbi/metadata/models. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://msit.powerbi.com' is therefore not allowed access. The response had HTTP status code 404. Failed to load resource: the server responded with a status of 404 (Resource Not Found) XMLHttpRequest cannot load https://df-msit-scus-api.analysis.windows.net/powerbi/metadata/models. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://msit.powerbi.com' is therefore not allowed access. The response had HTTP status code 404. Failed to load resource: the server responded with a status of 404 (Resource Not Found) I work in Australia, so maybe the CDN where the JS is hosted is not a trusted site for the .com domain. But I cant be sure. I also tested your URL in Edge and have the same issue. Here is the stack track from Chrome; ai.0.js:1 OPTIONS https://df-msit-scus-api.analysis.windows.net/powerbi/metadata/models XMLHttpRequest.send @ ai.0.js:1(anonymous function) @ powerbiportal.dependencies.bundle.min.js:115n @ powerbiportal.dependencies.bundle.min.js:111(anonymous function) @ powerbiportal.dependencies.bundle.min.js:108(anonymous function) @ powerbiportal.dependencies.bundle.min.js:143$eval @ powerbiportal.dependencies.bundle.min.js:157$digest @ powerbiportal.dependencies.bundle.min.js:154$apply @ powerbiportal.dependencies.bundle.min.js:158(anonymous function) @ powerbiportal.dependencies.bundle.min.js:171e @ powerbiportal.dependencies.bundle.min.js:57(anonymous function) @ powerbiportal.dependencies.bundle.min.js:60 view?r=eyJrIjoiNzAyMThlZGMtOTc4NS00YWM1LTkwOWYtYjYyNzVkZjdkODg2IiwidCI6IjcyZjk4OGJmLTg2ZjEtNDFhZi05…:1 XMLHttpRequest cannot load https://df-msit-scus-api.analysis.windows.net/powerbi/metadata/models. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://msit.powerbi.com' is therefore not allowed access. The response had HTTP status code 404. Is there anything else I can try here? Thanks again for your time, Alex11KViews0likes1CommentCORS error when viewing Published PowerBI Report
Hi, We are planning to embed PowerBI in an Angular2 app and have started publishing reports using the "Publish to Web" function. When we load just the published url in the browser (eg. https://app.powerbi.com/view?r=eyJrIjoiM2QwOGU3YmMtMjlkNC....) we receive CORS errors in the browser. The errors displayed are purely from the PowerBI site with no extra embedding used. "XMLHttpRequest cannot load https://wabi-south-east-asia-redirect.analysis.windows.net/powerbi/metadata/models. Request header field X-PowerBI-ResourceKey is not allowed by Access-Control-Allow-Headers in preflight response." These also occur multiple times after the load and sometimes causes the report to crash and then reload. Is this an issue with the report or configuration we are using, or is this a known issue? Thanks in advance for your time, AlexSolved11KViews0likes3Comments
Data Privacy
Microsoft Fabric Community and Privacy
To learn more about how we manage your data, please review the Microsoft Fabric Community Data Privacy guide.