Forum Discussion

MuriloMielke's avatar
MuriloMielke
New Member
1 year ago
Solved

Problem with customData on chained/composite datasets on embedded viewing

This is about embed reports on a app owns data scenario.   I have a report with a dataset that uses rls/customData to decide what to show.  This is the payload I use on /generateToken for it:    ...
  • v-veshwara-msft's avatar
    1 year ago

    Hi MuriloMielke ,

    Thanks for sharing the detailed scenario.

    You're right in observing that when using composite models, where one dataset imports another, the identity context passed during embedding, including customData and username, does not reach the imported (remote) dataset.

     

    Even though you’re including the identity object correctly in the embed token, the remote dataset won’t evaluate expressions like CUSTOMDATA() or USERNAME() based on it. This happens because RLS and identity functions are only evaluated within the dataset where they are defined, and they don’t pass through to other datasets that are connected or imported into the main model.

    This behavior is consistent with the limitations documented here: Use composite models in Power BI Desktop - Power BI | Microsoft Learn

     

    If you need the identity context to apply to both datasets, you’ll have to implement RLS separately in each dataset or consider flattening the model so everything resides in one semantic model.

     

    Hope this helps. Please reach out for further assistance.
    If this post helps, then please consider to Accept as the solution to help the other members find it more quickly.


    Thank you.