通过 Postman 访问 Power bi 的组和报告 [英] Access groups and reports of power bi through Postman
问题描述
我通过邮递员获取访问令牌,如下图所示
除非范围错误(我认为不是),否则我应该能够访问报告和 Power BI 组,只需将生成的令牌作为请求中的标头传递即可通过令牌后,我得到 403 我不确定我的请求有什么问题,尽管我知道 403 意味着缺少某些权利.有什么建议么 ?谢谢
现在我明白了这就是我认为的问题,但我不确定,ConsentType :AllPrinciapls
不记名令牌需要访问令牌,而不是客户端机密.您需要为 Power BI Embedded 案例注册本机应用而不是服务器端 Web 应用并授予足够的权限.
这样就可以调用GenerateToken API.
您终于可以调用报告了.示例在此处
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.
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屋!