cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Re: Embed group report problem

Here are some additional information of what happened in the background:

 

Chrome Console:

 

Screenshot at Sep. 13 06-52-27.png

 

 

Call Response:

 

 

{"error":{"code":"UnknownError","pbi.error":{"code":"UnknownError","parameters":{},"details":[]}}}

 Behaviour:

 

  1. Embedding of reports that are directly attachted to my workspace works without any problem
  2. Embedding of group-reports that are shared additionaly through a dashboard-sharing works even too
  3. 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 ?

Highlighted
Helper I
Helper I

Re: Embed group report problem

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

Highlighted
Helper I
Helper I

Re: Embed group report problem

@Eric_Zhan, all PowerBI application settings permissions was checked

Highlighted
Helper I
Helper I

Re: Embed group report problem

@supermulder, I've got same error - 401 during accessing .../modelsAndExploration URL

and the same error text: 

{"error":{"code":"UnknownError","pbi.error":{"code":"UnknownError","parameters":{},"details":[]}}}
Highlighted
Frequent Visitor

Re: Embed group report problem

@vospitannikov Have you found a solution in the meantime ?

Highlighted
Helper I
Helper I

Re: Embed group report problem

@supermulder, no, embedding group reports doesn't work 😞

Highlighted
Frequent Visitor

Re: Embed group report problem

@Eric_Zhang Any ideas left ? Maybe it´s neccesarry to provide the workspace-id for a specific power bi group to read the reports from this group ? 

Highlighted
Frequent Visitor

Re: Embed group report problem

same issue happened to me. 

When trying to access to reports in groups that were created in the last few days we cannot do it. We're getting the same 401 error. Now, if we try to access to reports in groups that were created say 3 months ago, we have no issue.

 

Another thing to mention. If you login to Power BI portal with the same account you're using for accessing the reports and then try your application (in the same browser instance) you will be able to access to those reports.

It seems like extra cookies saved during the login to the Power BI portal are helpful in these cases. So, the problem is not is not the access token itself.

Highlighted
Microsoft
Microsoft

Re: Embed group report problem

@vospitannikov

 

I follow the tutorial and it works loading report from a group and have now further idea on what exactly happens in your case. Maybe you will ask for support from Microsoft.

Highlighted
Frequent Visitor

Re: Embed group report problem

@Eric_Zhang

Which tutorial did you follow ?

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors