none
Issues embedding PowerBI Report inside our Website RRS feed

  • Question

  • Hi

    I have a following issue while i am going to use power bi API to embed power bi report via Json in our website. So can you please answer following questions, errors and doubt we have?

    1) Do we need PowerBi Pro account for using power bi API and generating embedded token for the Report ?

    As per below link it shows that we need one power bi Pro account. In free account it is not possible.


    2) We made report with parameters. Now as we want to pass this parameter dynamically after embedding to our web portal, so each of our logged user have a different data based on parameter passed , is it possible ?

    As per below url , it seems that it is not possible. because there are certain steps coming while we update the parameter like Provide Run permission confirmation and then Apply & refresh.


    1) Do we need PowerBi Pro account for using power bi API and generating embedded token for the Report ?

    As per below link it shows that we need one power bi Pro account. In free account it is not possible.


    2) We made report with parameters. Now as we want to pass this parameter dynamically after embedding to our web portal, so each of our logged user have a different data based on parameter passed , is it possible ?

    As per below url , it seems that it is not possible. because there are certain steps coming while we update the parameter like Provide Run permission confirmation and then Apply & refresh.


    3) While working with postman, we are able to get authentication token and embed token, but while working with API call from JavaScript via JSON then getting error.

    Access to XMLHttpRequest at 'https://login.microsoftonline.com/common/oauth2/token' from origin 'http://localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    No access token was found for element. You must specify an access token directly on the element using attribute 'powerbi-access-token' or specify a global token at: powerbi.accessToken.

        at Report.Embed.getAccessToken (powerbi.js:731)

        at Report.Embed.populateConfig (powerbi.js:746)

        at Report.populateConfig (powerbi.js:4677)

        at Report.Embed (powerbi.js:533)

        at new Report (powerbi.js:4422)

        at Service.embedNew (powerbi.js:299)

        at Service.embedInternal (powerbi.js:267)

        at Service.embed (powerbi.js:243)

        at HTMLDocument.<anonymous> (HtmlPage1.html:91)

        at mightThrow (jquery.js:3534)

    3) While working with postman, we are able to get authentication token and embed token, but while working with API call from JavaScript via JSON then getting error.

    Access to XMLHttpRequest at XXX/common/oauth2/token' from origin 'localhost' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    No access token was found for element. You must specify an access token directly on the element using attribute 'powerbi-access-token' or specify a global token at: powerbi.accessToken.

        at Report.Embed.getAccessToken (powerbi.js:731)

        at Report.Embed.populateConfig (powerbi.js:746)

        at Report.populateConfig (powerbi.js:4677)

        at Report.Embed (powerbi.js:533)

        at new Report (powerbi.js:4422)

        at Service.embedNew (powerbi.js:299)

        at Service.embedInternal (powerbi.js:267)

        at Service.embed (powerbi.js:243)

        at HTMLDocument.<anonymous> (HtmlPage1.html:91)

        at mightThrow (jquery.js:3534)

    Thanks

    Ankit Patel

    Sr. Product Manager

    Thursday, July 18, 2019 7:14 AM

All replies

  • Hi,

    Since your problem is more related to Power BI, it is out of the scope of UWP forum. I'd suggest you to ask about this in Microsoft Power BI Community. You could get more support about Power BI there.

    Best regards,

    Roy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, July 18, 2019 8:25 AM