简体   繁体   English

嵌入Power BI报告完整的Javascript

[英]Embed Power BI Report Full Javascript

I want to embed a Power BI Report using the REST API. 我想使用REST API嵌入Power BI报表。 So anyone knows how to make the authentication process trought javascript, ie get the access token, because the example of the Power BI documentation is done in C#. 因此,任何人都知道如何使身份验证过程变得像javascript一样,即获取访问令牌,因为Power BI文档的示例在C#中完成。 If someone know something would be helpful! 如果有人知道会有所帮助! thanks 谢谢

The reason you don't see a pure JavaScript example is that it wouldn't be secure. 您没有看到纯JavaScript示例的原因是它并不安全。 To complete the workflow you'd need to pass the client secret to the auth endpoint. 要完成工作流程,您需要将客户端密钥传递给auth端点。 In JavaScript that would be stored in plain text on the page. 在JavaScript中,将以纯文本形式存储在页面上。 Not good. 不好。 So use a server workflow. 因此,请使用服务器工作流程。 There are libraries for plenty of programming languages if C# is not your thing. 如果您不喜欢C#,那么有很多编程语言的库 If you're building a client app, there's a client workflow that does not require a server backend, but that's not appropriate for a web page. 如果要构建客户端应用程序,则有一个客户端工作流程不需要服务器后端,但是不适用于网页。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM