I want to publish a power bi report using an ajax script with HTMl (to get acces token), I wrote this code but when I run it I get an error (token blocked).

Msg Error :

I want to publish a power bi report using an ajax script with HTMl (to get acces token), I wrote this code but when I run it I get an error (token blocked).

Msg Error :

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek YadavPosted Feb 19, 2024, 9:47 AM
In order to embed a Power BI report using AJAX and HTML, you will need to follow the steps below:
Obtain an embed token and report ID: You will need to obtain an embed token and report ID for your Power BI report. You can do this by generating a token and retrieving the report ID from the Power BI portal.
Insert the Power BI report URL: In your HTML file, insert the Power BI report URL using the following code:
section of your HTML file:If you are still facing the "token blocked" error, it may be due to an issue with the token itself. Make sure to generate a new embed token and try embedding the report again. Additionally, ensure that the report ID and embed URL are correct in your code.
If you continue to experience issues, you may want to check the Power BI documentation or reach out to the Power BI support team for further assistance.