Forum Discussion
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
- Eric_ZhangMicrosoft Employee
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?
- vospitannikovHelper I
Eric_Zhang, yes, I followed exactly these instructions
and I'm pretty sure that token is valid - I can get the list of reports using GET request (https://api.powerbi.com/v1.0/myorg/groups/{someGroupId}/reports)
The only one difference between example and my code - that I'm trying to integrate group report, not default one
- vospitannikovHelper I
Eric_Zhang, I've integrated default report (not group one) and it works fine
Only groups reports cause mentioned above error
- Eric_ZhangMicrosoft Employee
Eric_Zhang wrote: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?
vospitannikov has confirmed that he followed this link.
- Eric_ZhangMicrosoft Employee
vospitannikov wrote:
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
Thanks for the clarification. I can embed the reports from groups well.
Regarding the bold part, do you mean that in web Url, you can embed the reports from groups without problem? If yes, what do you mean "in webUrl"?
- vospitannikovHelper I
Hello Eric_Zhang
Thank you for your response
By "webUrl" I mean data received during requesting reports from API (please pay attention to bolded text below)
http://docs.powerbi.apiary.io/#reference/report-preview/reports-collection/list-all-reports
{ "@odata.context": "https://api.powerbi.com/beta/myorg/$metadata#reports", "value": [ { "id": "84dbd390--5eb9fe91cdba", "name": "AdventureWorks", "webUrl": "https:// app.powerbi.com/reports/84dbd390---5eb9fe91cdba", "embedUrl": "https://app.powerbi.com/embedReport?reportId=84dbd390--5eb9fe91cdba" } ] }
I still facing the same problem during embedding group reports
and located in my personal workspace reports can be embed without any problems
Eric_Zhang, have you configured any special permissions for datasets/reports in order to let them be shared via embedding?
- Eric_ZhangMicrosoft Employee
Would you mind uploading the project in VS? By the way, ensure all the options are checked when registering an app for PBI.
- supermulderFrequent Visitor
I have exactly the same issue.
Embedding of my own reports works fine.
I have created 4 groups in power bi - only one report in one group can be embedded without a Problem, all reports that are within the other 3 groups can not be embedded (401 Unauthorized) - the group permissions are all the same.
Another problem:
I have written a small javascript function to switch dynamicly between reports. At this moment i try to load a report that does not work (see above) some error-handling goes wrong and the function does not longer work, i´m not able to embed the working report anymore - i think there is some error handling missing in your underlying powerbi.js framework.
function switchReport(id){
var embedConfiguration = {
type: 'report',
id: id,
accessToken: '{{AccessToken}}',
embedUrl: 'https://app.powerbi.com/reportEmbed'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);
}- supermulderFrequent Visitor
Some additional infos:
- I can embed all reports that are attached to my workspace :smileyhappy:
- I can only embed reports from other workspaces if i attached them to a group dashboard that is shared with my user
It seems that the group-permissions that i´ve configured in the group-configuration are not considered in the embedding process :-( So i´m only able to embed such reports in which i get a "permission" through the process of dashboard-sharing ...
Is this a known issue at the moment ? I would appreciate any help! Thank you!
- supermulderFrequent 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:loadReportIntoIframe('REPORT_ID','','IFRAME_ID')" >REPORT NAME</a>Loading a report from group:
<a href="javascript:loadReportIntoIframe('REPORT_ID','GROUP_ID','IFRAME_ID')" >REPORT_NAME</a>Next i will try to do the same with powerbi dashboards ...
- BjoernLueersAdvocate II
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.
- vospitannikovHelper 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-work-only-if-user-e
I would really appreciate if you can vote for it
Thank you in advance- mostojicRegular Visitor
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! :)