Forum Discussion
Embed group report problem
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"?
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_Zhang9 years agoMicrosoft Employee
Would you mind uploading the project in VS? By the way, ensure all the options are checked when registering an app for PBI.
- supermulder9 years agoFrequent Visitor
Eric_Zhang Do you have any idea / hint regarding my posts above ?
- supermulder9 years agoFrequent Visitor
Here are some additional information of what happened in the background:
Chrome Console:
Call Response:
{"error":{"code":"UnknownError","pbi.error":{"code":"UnknownError","parameters":{},"details":[]}}}Behaviour:
- Embedding of reports that are directly attachted to my workspace works without any problem
- Embedding of group-reports that are shared additionaly through a dashboard-sharing works even too
- Group-reports with the correct permission for my user (i´m able to view them in powerbi online) cannot be embedded, instead of the report i get the message "This content is not available" and the error described above.
Access-Token Generation:
$session = $this->get("session"); $provider = new \TheNetworg\OAuth2\Client\Provider\Azure([ 'clientId' => $this->clientId, 'clientSecret' => $this->clientSecret, 'redirectUri' => $this->redirectUri, '' ]); if (!isset($_GET['code'])) { // If we don't have an authorization code then get one $authUrl = $provider->getAuthorizationUrl(); $session->set("oauth2state",$provider->getState()); header('Location: '.$authUrl); exit; } else { $token = $provider->getAccessToken('authorization_code', [ 'code' => $_GET['code'] ]); }Token - Values Dump:
array:7 [▼ "token_type" => "Bearer" "scope" => "Dashboard.Read.All Dataset.ReadWrite.All Group.Read Report.Read.All" "ext_expires_in" => "0" "expires_on" => "1473745814" "not_before" => "1473741914" "resource" => "https://analysis.windows.net/powerbi/api" "id_token" => "...." ]
Question:
Is it possible that i have to do something additional to get an accesstoken that provides access to group workspaces instead of having only access to reports / dashboards that are directly attached to my workspace ?
- vospitannikov9 years agoHelper I
Hello Eric_Zhang
I've uploaded project where I can reproduce this error to GitHub
https://github.com/vospitannikov/PowerBIGroupReportIntegrationError
Please pay attention to "TODO" comments in order to set all needed data
Also, you need to create PowerBI application before running this project
You need access to some PowerBI group with report
1. access to some PowerBI group with report (in order to reproduce this error)
2. some not group report (in order to see that it works fine for general reports, not group one)
Please let me know if you can reproduce this error
- vospitannikov9 years agoHelper I
Eric_Zhan, all PowerBI application settings permissions was checked