Forum Discussion

Bahneby's avatar
Bahneby
Frequent Visitor
2 years ago
Solved

Power BI Embedded Composite Model With RLS

Hi everyone,   I have two semantic models with RLS. The first semantic model has the RLS "RLS_1" and the second semantic model has the RLS "RLS_2". Then I built a composite model which has a direct...
  • AmosHersch's avatar
    2 years ago

    This scenario is supported. You can embed a composite model with several connected datasets, each with its own RLS context.

     

    As a general note, if you receive a "bad request" try to see the response body, it sometimes has additional information for the reason Power BI claims it's a bad reques.

     

    The challenge for your scenraio is generating an embed token correctly. For generating an embed token for composite model with DirectQuery connection to additional semantic models (datasets) your request should contain all dataset IDs in the datasets list, and you should specify xmlaPermissions = ReadOnly for them.

    See here for example: Embed Token - Generate Token - REST API (Power BI Power BI REST APIs) | Microsoft Learn

    In your case you should also add the effective identitiy of each dataset which has RLS.