Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

DRLS in DirectQuery and Cross-filter security

Hi community,

 

I'm struggling with a RLS on a HANA data source. I did not join the table but use IN function instead to achieve the security feature. I have two questions:

 

1. When I do SAP HANA data import, the RLS does not work during UAT. I found out that RLS only works with DirectQuery according to a microsoft document. Is this sill true?

 

2. When I switch to DirectQuery to SAP HANA, and implement the same logic with the data import, I get the following error message: 

 

 

 

I'm using the lastest version of Power BI and could not find this option anywhere. Anyone has any idea about how to solve it?

 

Thanks in advance!

2 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi Anonymous 

    1.

    How did you create RLS in your scenario?

     

    I can't find any official documents regarding the topic "RLS only works with DirectQuery".

    Could you show me which article you find?

     

    According to this article, you could create RLS in Power BI Desktop regardless of "import" or "direct query".

    SAP HANA and RLS

    Row-level security (RLS) with Power BI

     

    2.

    Read this article "bidirectional cross-filtering for DirectQuery"

    please try to disable "Cross-filter security" one your side and see if it helps.

     

    Best Regards

    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Maggie,

       

      Thanks for the help. It's an uncommon scenario so I used username(), IN, FILTER(), and SELECTCOLUMN() to achieve the RLS. username() returns user's email address when published in the PBI service. 

       

      When using HANA import data, it works on PBI desktop. However, when I publish it to PBI service, users see an error message on the report, and suspect that it is because of the import data. The reason is here: https://docs.microsoft.com/en-us/power-bi/service-admin-rls

       

       

       

       

      When I swith to HANA DirectQuery, I got the error message above and could not find any documentation about it. 

       

      Another weird thing is when I published the report (HANA import) in App, user would see error with "This visual contains restricted data" where the user should see some of the data. 

       

      Any ideas about what's going on? Thanks!