Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Test as role "not supported" message for composite model

I have report which uses a composite data model, with a mix between DirectQuery to other Power BI datasets and some imported tables from SQL Server. The model also uses calculation groups, allthough I do not think this is related to the issue.

 

The data model also has RLS, and I can test this in desktop and it works as intended. 

However, when I publish the report to the service and I want to "test as role", I get the following error message.

rls2.PNGrls1.PNG

Is this a bug, or is "test as role" really not supported for a composite model?

Status: Investigating

Hi @daaa ,

 

Please check if SSO is enabled. The Test as role/View as role feature doesn't work for DirectQuery models with single sign-on (SSO) enabled.

 

Through my testing, dq schema connection to sql server data source mixed with import schema of sql server's composite model, RLS takes effect. lc schema connection to power bi dataset then converted to dq schema and then mixed with import schema data source, RLS is not supported.

 

Refer: Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Use composite models in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Community Support Team _ Neeko

Comments
v-tangjie-msft
Community Support
Status changed to: Investigating

Hi @daaa ,

 

Please check if SSO is enabled. The Test as role/View as role feature doesn't work for DirectQuery models with single sign-on (SSO) enabled.

 

Through my testing, dq schema connection to sql server data source mixed with import schema of sql server's composite model, RLS takes effect. lc schema connection to power bi dataset then converted to dq schema and then mixed with import schema data source, RLS is not supported.

 

Refer: Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Use composite models in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Community Support Team _ Neeko

daaa
Advocate I

Hi @v-tangjie-msft ,

 

SSO is not enabled.

As mentioned my model is a composite model with DQ from a Power BI dataset and import from SQL server. I have implemented RLS, and I can test it in Power BI Desktop, where it works as intended. I just cant test it online, because I get the error shown.

If I read your message correctly, you are saying RLS shouldnt work at all with my datamodel setup? If yes, that doesnt seem to be the case - at least not in Power BI Desktop

 

Raghu12
Regular Visitor

@daaa , Even i have the same setup as yours, direct connection to PBI dataset and import with SQL Sever. 
Did you figure out any alternative to implement RLS ?

daaa
Advocate I

Hi @Raghu12 ,
In fact RLS works fine, I just cannot test it online.

Some more details on my setup.

  • I create a relationship between the imported tables and the tables coming from Power BI over directQuery (DQ)
  • I implement RLS on the imported table, having the relationship to the DQ table.
  • I put a column from the imported table that has a relation to the DQ table as a report level filter, and set it to "is not blank".

 

If I do the above RLS works fine, and I can test it in Power BI Desktop. I just cannot test it online, which I still think is a bug, but apparently the community support have stopped monitoring this thread. But even though I cannot test it online, I have verified with an end-user, that RLS still works fine when the report is published.

Raghu12
Regular Visitor

Thanks @daaa , for your quick and prompt response ,
it helped me to come out of obsession of RLS not working in my composite model 😀.
i will go ahead and implement RLS in my report 

v-negee
Microsoft Employee

Hi @v-tangjie-msft 
I am facing the same issue for composite models, I cannot test it online, seems like it is a bug in service. Even though I cannot test it online, I have verified with an end-user and RLS works fine. Please check this bug

amyspracklen
Regular Visitor

I have the same problem. It's incredibly frustrating to not be able to test as role. Is this on the roadmap to fix soon?

stefan_h
Regular Visitor

Any news about this bug? We have to harass end users to ensure RLS is working because we cannot test it.

daaa
Advocate I

@v-tangjie-msft Please respond. As you can see from the amount of attention this thread is getting, we are many people who needs an update on this.

wgjunsay
Advocate I

Just wanted to join in and say I am also experiencing this issue with my composite models. Please advice on what should be the next steps or if there is a fix underway. Thank you!