Reply
Regular Visitor
Posts: 37
Registered: ‎07-17-2018

Re: How To: Get embed token using Get/Post only

@adamwallace3 I'm sending Post request with like in your first step. But getting this error : 


"error": "invalid_request",
"error_description": "AADSTS90014: The request body must contain the following parameter: 'grant_type'.\r\

My App type is web/api in azure . Is there a solution to fix this grant_type issue? 

Frequent Visitor
Posts: 2
Registered: ‎08-01-2018

Re: How To: Get embed token using Get/Post only


@d_u_a wrote:

@adamwallace3 I'm sending Post request with like in your first step. But getting this error : 


"error": "invalid_request",
"error_description": "AADSTS90014: The request body must contain the following parameter: 'grant_type'.\r\

My App type is web/api in azure . Is there a solution to fix this grant_type issue? 


I used to have that error message. I tried using postman and go to the body and make sure you chose the form-data and feed the key/value needed for the request and all should work

Frequent Visitor
Posts: 10
Registered: ‎09-13-2018

Re: How To: Get embed token using Get/Post only

I get a nasty error saying:

400 Client Error: Bad Request for url: https://login.windows.net/common/oauth2/token
{
"timestamp": "2018-09-14 01:18:04Z",
"trace_id": "a6c902bb-2263-44ce-8675-ce1fa7196c00",
"correlation_id": "94d0a3bb-0b79-4cc9-9d52-bce7973c438e",
"error_description": "AADSTS70002: Error validating credentials. AADSTS50126: Invalid username or password\r\nTrace ID: a6c902bb-2263-44ce-8675-ce1fa7196c00\r\nCorrelation ID: 94d0a3bb-0b79-4cc9-9d52-bce7973c438e\r\nTimestamp: 2018-09-14 01:18:04Z", 01:30 Dur 21:16:15
"error": "invalid_grant",
"error_codes": [
70002,
50126
]
}

 

everytime. I registered a native app however, everytime I try to use my UserCredentials.. I get the above error... Any guidance would be great.

Frequent Visitor
Posts: 4
Registered: ‎09-19-2018

Re: How To: Get embed token using Get/Post only

i have successfully completed all the three steps as described in the tutorial bu at step 4 when i used my access token to generate the embed for me, HTTP gives the blank reponse there is no json array in the response as described in the tutorial and also it does not give any error .Any help regarding this issue would be appreciated thankx  

Frequent Visitor
Posts: 4
Registered: ‎09-12-2018

Re: How To: Get embed token using Get/Post only

Hi, I've been able to complete the first 4 steps in Postman. 

However on testing the embed code in Microsoft Power BI Embedded Playground, i keep getting following error :

> Json Object { "message": "LoadReportFailed", "detailedMessage": "Fail to initialize - Could not resolve cluster", "errorCode": "403", "level": 6, "technicalDetails": { "requestId": "57679585-022b-4871-ae6d-bb722d4a07cc" } }

Also, when trying the alternative, HTML setup provided in STEP 5, i again keep getting 403 error stating : "GET https://wabi-india-west-redirect.analysis.windows.net/powerbi/globalservice/v201606/clusterdetails 403 (Forbidden)"

Please help. I've been trying to get this thing to work for over a week now.

Visitor
Posts: 1
Registered: ‎11-19-2018

Re: How To: Get embed token using Get/Post only

Just great, thanks for sharing !

Highlighted
Occasional Visitor
Posts: 1
Registered: ‎01-16-2019

Re: How To: Get embed token using Get/Post only

You get this "invalid_request" error probably because you simply copy/pasted data: {} into body raw. I got the same error when I did it, but got it work by copy only the key/value pairs inside the curely braces and paste it into form-data using Bulk Edit (of course enter your credentials).