通过 Postman 访问 Power bi 的组和报告

编程入门 行业动态 更新时间:2024-10-27 10:30:32
本文介绍了通过 Postman 访问 Power bi 的组和报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我通过邮递员获取访问令牌,如下图所示

除非范围错误(我认为不是),否则我应该能够访问报告和 Power BI 组,只需将生成的令牌作为请求中的标头传递即可通过令牌后,我得到 403 我不确定我的请求有什么问题,尽管我知道 403 意味着缺少某些权利.有什么建议么 ?谢谢

现在我明白了这就是我认为的问题,但我不确定,ConsentType :AllPrinciapls

解决方案

不记名令牌需要访问令牌,而不是客户端机密.您需要为 Power BI Embedded 案例注册本机应用而不是服务器端 Web 应用并授予足够的权限.

这样就可以调用GenerateToken API.

您终于可以调用报告了.示例在此处

参考问题及其答案:community.powerbi/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/td-p/310054

I am getting an access token through post man as shown from image below

Unless the scope is wrong which i think is not i should be able to access reports and groups of power BI, just by passing the generated token as header in the request After passing the token i get 403 I am not sure what is wrong with my request although i do know 403 means some rights are missing. Any suggestions ? Thank you

Now i am getting this This is what i think might be the issue but i am not sure, ConsentType :AllPrinciapls

解决方案

The bearer token requires an access token, not the client secret. You need register a Native app rather than a server-side web app for Power BI Embedded cases and grant sufficient permissions.

Register App

Granting Permission

Then to get the access token, you can call the POST API in POSTMAN as

POST /common/oauth2/token HTTP/1.1 Host: login.windows Cache-Control: no-cache Content-Type: application/x-www-form-urlencoded client_id={client id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows%2Fpowerbi%2Fapi&username={your power bi account}&password={your Power BI password}

So that you can call you can call the GenerateToken API.

At last you can call Reports. Example is given here

Ref Question and it's answer: community.powerbi/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/td-p/310054

更多推荐

通过 Postman 访问 Power bi 的组和报告

本文发布于:2023-10-30 12:13:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542817.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:报告   Postman   Power   bi

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!