cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Embed group report problem

I'm trying to integrate PowerBI report (located in group) into my page using iframe

I've registered AD application

I can query list of reports from the server side

But when I'm trying to use received "embedUrl" value using the same token I'm getting following error message:

"This content is not available.
Learn more about Power BI."

 

At the same time, if I open list of network requests in chrome DevTools, I can see the one request to some page ending in "modelsAndExploration" which return 401 error: Unauthorized

 

If I'm trying to open URL received in webUrl, I can successfully see report in PowerBI interface

 

Any suggestions/ideas?

28 REPLIES 28
Highlighted


@Eric_Zhang wrote:

@vospitannikov

 

How did you embed the report, did you follow this sample Integrate a report into an app?

 

Also please ensure the token is not expired, did you try to get a new token and embed?


@supermulder

@vospitannikov has confirmed that he followed this link.

Highlighted
Frequent Visitor

Thank you. I finally found a solution.

 

I´m not using the powerbi-javascript-library anymore, regarding of the issue that it is not possible to set the groupid of a report at the moment.

 

Instead i use the following javascript-code (based on the provided example).

 

<script>

function loadReportIntoIframe(reportId,groupId,iframeId){
    var iframe = document.getElementById(iframeId);
    var iframeUrl = 'https://app.powerbi.com/reportEmbed?reportId='+reportId;
    if (groupId){
        iframeUrl = iframeUrl + '&groupId=' + groupId;
    }
    iframe.src=iframeUrl;
    iframe.onload = postActionLoadReport;
}

// Post the access token to the IFrame
function postActionLoadReport() {
    // Construct the push message structure
    // this structure also supports setting the reportId, groupId, height, and width.
    // when using a report in a group, you must provide the groupId on the iFrame SRC
    var m = {
        action: "loadReport",
        accessToken: 'YOUR_AAD_ACCESSKEY'
    };
    message = JSON.stringify(m);

    // push the message.
    iframe = document.getElementById('iFrameEmbedReport');
    iframe.contentWindow.postMessage(message, "*");;
}
</script>

Sample:

 

Loading a report from your worksspace:

 

<a href="javascript&colon;loadReportIntoIframe('REPORT_ID','','IFRAME_ID')" >REPORT NAME</a>

Loading a report from group:

<a href="javascript&colon;loadReportIntoIframe('REPORT_ID','GROUP_ID','IFRAME_ID')" >REPORT_NAME</a>

Next i will try to do the same with powerbi dashboards ...

Highlighted

@Eric_Zhang 

 

you said you made it work, did you try accessing reports from new groups? Since, we're having the same problem only with new groups (for groups that were created like 3 months ago we don't have any problem at all) and we're also following the tutorial you mentioned.

 

regards

Highlighted

@smolina74

 

Maybe you can try me approach (posted above) - with this i can access any report, regardles of its age.

 

@Eric_Zhang

 

At the moment it seams to be that it is only possible to embed dashboard tiles into iframes and not the dashboards itself.

There is a highly rated ticket regarding this issue - https://ideas.powerbi.com/forums/268152-developer-apis/suggestions/8528704-allow-powerbi-dashboards-...

 

Do you know when is this going to be integrated ? Do you know other ways to embed dashboards that are working today?

Highlighted

 
Highlighted

We have exactly the same problem. Embedding of personal reports still works perfectly (except in Chrome) but since recently group reports are not working anymore. We have been using the approach to add a groupID parameter to the report Url but we also tried to set group and report ID via post message with the same negative result.

Highlighted

Hell @Eric_Zhang

Thank you for testing group report integration

 

Can you confirm, that this integration works correctly even if you didn't open PowerBI portal before testing?

So, steps to reproduce should be like this:

  1. close all browser windows
  2. open page with embed report
  3. the report works as expected

It is important to close all browser windows before testing because, as @hesmono said, if you login to PowerBI portal, then integration works as expected. It looks like some additional cookies such as ".AspNet.Cookies", "ASP.NET_SessionId" from app.powerbi.com domain are added during login to PowerBI portal

 

Thank you in advance

Highlighted
Helper I
Helper I

@BjoernLueers@supermulder@smolina74@Eric_Zhang

 

I believe that this is PowerBI server side error
I've reported issue with detailed steps to reproduce:
https://ideas.powerbi.com/forums/360879-issues/suggestions/16694833-error-group-reports-embedding-wo...
I would really appreciate if you can vote for it
Thank you in advance

Highlighted

I've had the same problem... "This content is not available. Learn more about Power BI" message was showing everytime I tried to open embedded Power BI report in my application. Report was loaded only after I signed to Power BI account and refreshed the page with report in my application.

 

However, everything is working fine after I applied the newest update (November) and published the report. 

 

Thanks, Power BI team! 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021