Forum Discussion

DanielReinman's avatar
DanielReinman
Frequent Visitor
2 years ago

Embed Power BI Report that Uses a Semantic Model

Hi,

I have a website that contains several Power BI Embeded Reports. They are embeded utilizing JSON scripting. However, they all currently have their reports and datasets in the same workspace. 

 

I have a need to embed a report on the website that utilizes a semantic model - meaning the report(s) are in one workspace and the Dataset they are connected to resides on another workspace.

 

When I enter the Group, Report, and Dataset IDs, the report does not display.  My assumption is that the embed process is getting confused because it is expecting the Report and the Dataset to be in the same Group/workspace ID.

 

Is this possible to do this?

 

The code I am using is below:

 

{

    "json": {

        "identities": [

            {

                "roles": [

                    "RegionRestricted"

                ],

                "datasets": [

                    "xxx"

                ],

                "username": "THIRD_PARTY"

            }

        ],

        "accessLevel": "View"

    },

    "groupId": "xxx",

    "reportId": "xxx",

    "settings": {

        "filterPaneEnabled": false,

        "navContentPaneEnabled": false

    }

}

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DanielReinman 

     

    Power BI Embedded allows us to generate one Embed Token to bind multiple datasets and reports.

    You can make some changes in the profiles you bind to the dataset:

    --------------------------------------------------------

    {

                    …

                   "datasets": [

                     {

                   "id": "xxx1"

                     },

                     {

                   "id": "xxx2"

                     }

                    ],

      "reports": [

        {

          "id": "xxxx"

        }

    }

    --------------------------------------------------------

    After that, different RLS role needs to be bound to the corresponding dataset:

    For example, in the following picture that the first dataset corresponds to the role of ‘sales’, and the second dataset corresponds to the role of ‘executive’.

    Link of RLS in embedded token:

    Using standard cloud based row-level security with embedded content in Power BI embedded analytics - Power BI | Microsoft Learn

    Link of example of generating an embed token for two datasets with RLS identities.

    Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn

     

    Best Regards,

    Zhengdong Xu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • DanielReinman's avatar
      DanielReinman
      Frequent Visitor

      Thank you for the response. However the issue I am encountering is not that I have multiple reports; wehave already solutioned for this and applied RLS that works effectively, based upon the UPN of whomever is accessing the data. The issue seems to me that the Dataset and report reside in entirely different workspaces, so the group ID related to the dataset is different than the group ID related to the report.  Are you aware of a way to overcome this? Should I be listing both Group IDs in the code?