我正在尝试通过调用以下端点来为报告生成嵌入 token ,但这让我遇到了 CORS 问题。
Failed to load https://api.powerbi.com/myorg/groups//reports//GenerateToken: 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:4200' is therefore not allowed access. The response had HTTP status code 403.
power bi dashboard 中是否有任何设置或启用 CORS 并设置允许的来源?
最佳答案
如果您在服务器端代码中调用 power api,则不会出现 cors 问题。 powerbi 仪表板中无需更改设置。 如果可以,请分享代码片段。
关于powerbi - PowerBI API 的 CORS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49518890/