cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
azulcore Frequent Visitor
Frequent Visitor

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

All of the steps work except for the last step. I entered all the values in the https://microsoft.github.io/PowerBI-JavaScript/demo and it works well. But using your html code at the end just gives a blank page, any ideas? I use clientid and clientsecret if that makes a difference

ashleymartin Frequent Visitor
Frequent Visitor

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

Step 4 is not working for me. I was able to get the access token in step 2 and then able to run step 3. For step 4 I entered the header information into postman under header and the data information under the body but I am getting this error:

 

{
"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
{
"message": "Unexpected character encountered while parsing number: W. Path '', line 1, position 6.",
"target": "request"
}
]
}
}
]
}
}

 

Is anyone else experiencing this or know of a way I can fix this? Also for reference I am doing a server-web app and have added the client secret into the first step, not sure if I would need to add anything in this 4th step too or if there is another reason it is showing this error.

matthewgouws Frequent Visitor
Frequent Visitor

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

Hi,

Did you find the solution to the error you were getting in Step 4 ?

Thanks in advance!

matthewgouws Frequent Visitor
Frequent Visitor

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

Hi,

Did you manage to find a solution to the error you were getting in step 4 of this guide?

Regards,

Matt

zachmiller Frequent Visitor
Frequent Visitor

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

@ashleymartin The "data= {}" section of step 4 needs to be put into the "Body" tab on Postman. You can click the "raw" radio button to be able  to paste it in directly. The headers go in the headers tab as well. Other than that, make sure that the access token you have is not expired. From there, you can use the embed token where ever you deem appropriate.

riyanka Visitor
Visitor

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

could you please send screenshot of step no 2 in postman 

zachmiller Frequent Visitor
Frequent Visitor

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

postmanrequest.png

 

Here's how Step 2 should be set up in Postman, keeping in mind that I obviously censored the 4 empty values.

aaco Frequent Visitor
Frequent Visitor

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

Hi,

 

When executing the step 4 in Postman (adding the Authorization token in the headers and the Data in the body) I'm getting the following error:

 

{
"error": {
"code": "",
"message": "The request entity's media type 'multipart/form-data' is not supported for this resource."
}
}

 

Capture.JPG

 

Also, when running step 5 in Chrome, I get this error message:

 

GET https://wabi-north-europe-redirect.analysis.windows.net/metadata/cluster 403 (Forbidden)

 

 

From step 1 to step 3 all works as described. Is someone else getting the same error message? Any ideas of how to fix it or where it should be coming from?

 

Many thanks

aaco Frequent Visitor
Frequent Visitor

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

So, I figured out that I wasn't using the Body > raw > JSON (application/json) option in Postman. Now I do it but am getting a different error:

 

{
"error": {
"code": "Unauthorized",
"message": "Report.Read.All Dataset.Read.All"
}
}

 

Capture2.JPG

 

For info, steps 1 to 3 are still OK and permissions on the Azure App Registration side for 'Power BI Service' are all set to 'DELEGATED' (19 in total).

 

Thanks again.

d_u_a Regular Visitor
Regular Visitor

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?