Power BI angular1 身份验证
Power BI angular1 authentication
我正在尝试将 Power BI 集成到 angular 1 个应用程序中。从我的研究中我开始知道我必须遵循以下过程
- 验证用户并获取访问令牌
- 通过使用此令牌获取嵌入令牌
但我在第一步就被打动了。如何认证?
我给 https://login.microsoftonline.com/common/oauth2/token
打了 API 电话
带参数:
grant_type:'password',
client_id: 客户编号,
资源:'https://analysis.windows.net/powerbi/api',
范围:'openid',
username:username,
password:password,
client_secret : client_secret
我收到以下回复:
"error": "invalid_client",
"error_description": "AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\r\nTrace ID: 51694a76-ebf8-4923-9a8c-2a1ad2e35600\r\nCorrelation ID: f25bedeb-7aa9-45db-a93f-d8dfd85d0f19\r\nTimestamp: 2017-11-27 06:02:56Z",
"error_codes": [
70002,
50012
],
"timestamp": "2017-11-27 06:02:56Z",
"trace_id": "51694a76-ebf8-4923-9a8c-2a1ad2e35600",
"correlation_id": "f25bedeb-7aa9-45db-a93f-d8dfd85d0f19"
我不知道我是不是打对了API。参数中的资源有什么用?
谁能帮忙!谢谢
通过向 https://login.windows.net/common/oauth2/token
发出 post 请求并遵循 params
,我能够获得授权令牌
grant_type,Client_id,resource,username,password
此外,从错误来看,您发送的似乎是无效的 client secrate
我正在尝试将 Power BI 集成到 angular 1 个应用程序中。从我的研究中我开始知道我必须遵循以下过程
- 验证用户并获取访问令牌
- 通过使用此令牌获取嵌入令牌
但我在第一步就被打动了。如何认证?
我给 https://login.microsoftonline.com/common/oauth2/token
打了 API 电话带参数:
grant_type:'password', client_id: 客户编号, 资源:'https://analysis.windows.net/powerbi/api', 范围:'openid', username:username, password:password, client_secret : client_secret
我收到以下回复:
"error": "invalid_client",
"error_description": "AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\r\nTrace ID: 51694a76-ebf8-4923-9a8c-2a1ad2e35600\r\nCorrelation ID: f25bedeb-7aa9-45db-a93f-d8dfd85d0f19\r\nTimestamp: 2017-11-27 06:02:56Z",
"error_codes": [
70002,
50012
],
"timestamp": "2017-11-27 06:02:56Z",
"trace_id": "51694a76-ebf8-4923-9a8c-2a1ad2e35600",
"correlation_id": "f25bedeb-7aa9-45db-a93f-d8dfd85d0f19"
我不知道我是不是打对了API。参数中的资源有什么用?
谁能帮忙!谢谢
通过向 https://login.windows.net/common/oauth2/token
发出 post 请求并遵循 params
grant_type,Client_id,resource,username,password
此外,从错误来看,您发送的似乎是无效的 client secrate