通过 Postman 访问组和 power bi 报告 [英] Access groups and reports of power bi through Postman

查看:15
本文介绍了通过 Postman 访问组和 power bi 报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

现在我得到了这个这就是我认为可能的问题,但我不确定,ConsentType :AllPrinciapls

解决方案

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

您可以调用 GenerateToken API.

最后你可以调用报告.这里

给出了示例

参考问题及其答案:https://community.powerbi.com/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.net
Cache-Control: no-cache 
Content-Type: application/x-www-form-urlencoded

client_id={client id}&grant_type=password&resource=https%3A%2F%2Fanalysis.windows.net%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: https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/td-p/310054

这篇关于通过 Postman 访问组和 power bi 报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆