Forum Discussion
Problem with customData on chained/composite datasets on embedded viewing
- 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.
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.
Hi MuriloMielke ,
Just wanted to check if the response provided was helpful. If yes, please consider marking it as "Accepted Solution" to assist others with similar queries. If further assistance is needed, please reach out.
Thank you.