无法使用restapi连接到Power bi? [英] Unable to connect to Power bi using restapi?
问题描述
我正在尝试将POST请求发送给
https://login.windows.net/common/oauth2/token 获取带有体内参数的授权代码:
{
grant_type:密码,
client_id: xxxxxxxxxxxxxxxxxx,
资源: https://analysis.windows.net / powerbi / api,
用户名: xxxxx.onmicrosoft.com,
密码: xxxxxxx,
client_secret: xxxxxxxxxxxxxx
}
我遇到错误:
{ error: invalid_request, error_description: AADSTS90014:
请求正文必须包含以下参数:'grant_type'。Trace
ID:6725893b-5f12- 4f6b-9334-ea6c86f10400相关ID:
27f51716-70fb-45f0-85d5-4ccfb32390c2时间戳记:2018-10-16 12:21:04Z,
error_codes:[90014], timestamp : 2018-10-16 12:21:04Z,
trace_id: 6725893b-5f12-4f6b-9334-ea6c86f10400, correlation_id:
27f51716-70fb-45f0-85d5-4ccfb32390c2}
应将什么作为资源参数?
我该如何解决这个问题?
我用Google搜索了您的错误代码(AADSTS90014),并找到了许多有关该主题的帖子。乍一看,我将在本文底部尝试该解决方案:
我本来会留此作为评论,但我仍然缺少50个必需的声誉点。
谢谢 p>
I am trying to send POST request to
https://login.windows.net/common/oauth2/token to get authorization code with parameters inside the body:
{
"grant_type":"password",
"client_id":"xxxxxxxxxxxxxxxxxx",
"resource":"https://analysis.windows.net/powerbi/api",
"username":"xxxxx.onmicrosoft.com",
"password":"xxxxxxx",
"client_secret":"xxxxxxxxxxxxxx"
}
I am getting error:
{ "error": "invalid_request", "error_description": "AADSTS90014: The request body must contain the following parameter: 'grant_type'. Trace ID: 6725893b-5f12-4f6b-9334-ea6c86f10400 Correlation ID: 27f51716-70fb-45f0-85d5-4ccfb32390c2 Timestamp: 2018-10-16 12:21:04Z", "error_codes": [ 90014 ], "timestamp": "2018-10-16 12:21:04Z", "trace_id": "6725893b-5f12-4f6b-9334-ea6c86f10400", "correlation_id": "27f51716-70fb-45f0-85d5-4ccfb32390c2" }
what should be given as resource paramter?
how can i solve this issue?
I googled your error code (AADSTS90014) and found a lot of posts on the topic. At a glance, I would try the solution at the bottom of this post:
I would have left this as a comment but I'm still short of the 50 required reputation points.
Thanks
这篇关于无法使用restapi连接到Power bi?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!