Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
Expand all | Collapse all

RLS issue - on Power BI service (when Test as a Role)

  • 1.  RLS issue - on Power BI service (when Test as a Role)

    Bronze Contributor
    Posted 28 days ago
    Edited by Ramar Veerasamy 28 days ago
    I created RLS for company level access based on user email id=USERNAME(). In my PBI Desktop i have added individual mail id with double quot like this "mchristian@superstore.com" that is working fine & gives proper result for all. in my table currently 5 user's But after publishing to Power BI Service  i am using test as a role it's working for 2 user's, not working for 3 user's. checked exacltly mail i'd spellings from DB & PBI all are correct.
    other than there is no clue why it's not working for the 3 user's.

    Any of you, can you please guide me

    Thanks in advance!

    USERPRINCIPALNAME ( ) also tried. not working for that 3 user's.
    ------------------------------
    Ramar Veerasamy
    Associates Reports Developer
    7708177403
    ------------------------------
    Conference-PBI_200x200


  • 2.  RE: RLS issue - on Power BI service (when Test as a Role)

    Top Contributor
    Posted 27 days ago
    Hi @Ramar Veerasamy,

    Please can you check your file where you have all the usernames, there might some filtering issue going on there​.

    Also, please can you check if you have assigned the other 3 users to the roles that you have created.

    I am just guessing stuff and won't be able to comment without having a look at the file.

    Kindly share if there is any other information.

    Thank you,

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------

    Conference-PBI_200x200


  • 3.  RE: RLS issue - on Power BI service (when Test as a Role)

    Bronze Contributor
    Posted 25 days ago
    Edited by Ramar Veerasamy 25 days ago
    Hello @Vishesh Jain,

    below is my data model & AT Team(RLS).
    For Testing i used that user name & mail id as a filter in the same page,it filters the page & gives the result properly. For that security filter also applied in my model.

    For the same AT Team(RLS) works for 2 user's & not working for 3.



    PBI Desktop i checked(all 5) the RLS with individual email id. it's working. But PBI Services showing blank for 3 user's
    Can you please give me some idea or any other possible ways with DAX


    ------------------------------
    Ramar Veerasamy
    Associates Reports Developer
    7708177403
    ------------------------------

    Conference-PBI_200x200


  • 4.  RE: RLS issue - on Power BI service (when Test as a Role)

    Top Contributor
    Posted 25 days ago
    Edited by Vishesh Jain 25 days ago
    Hi @Ramar Veerasamy,

    Please can you tell us if there is some reason for the Bi-directional filter from AR Team to Company and all the other Bi-Di that you have in your model.

    Secondly, I think there could be 2 issues in your data.
    1. Please check if the user's who's email ids are not working, have they been assigned a company id in the AR Team table.
    If there is no company assigned, then the filter wont pass to company ID, hence you see blanks.

    2. If those 3 users have been assigned company ID, please check if that company ID exists in the Company table as well.
    Again, the filters will act here and if the company IDs do not exist in the company table, it will show only blanks.

    These are the 2 things that I could think of from whatever information you provided.

    If these do not work, please provide more information or share a sample file.

    Hope this helps.

    Thank you,

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------

    Conference-PBI_200x200


  • 5.  RE: RLS issue - on Power BI service (when Test as a Role)

    Bronze Contributor
    Posted 25 days ago
    i checked company id's available in two tables. Giving company level access to user's. So that i am joining AR team table to company table with Bi directional.

    Thanks for the help @Vishesh Jain. really happy. first point figured out USERNAME() function returning the email id values for those 3 user's with .onmicrosoft.com. our Data base stored only with company name extension (ex: spayne@superstore.com).
    USERNAME()
    spayne@superstore.onmicrosoft.com

    in outlook i can able to see proper mail id for these user's. give me a hint which place it needs to be removed onmicrosoft.com. So that IT Team will help me on this

    ------------------------------
    Ramar Veerasamy
    Associates Reports Developer
    7708177403
    ------------------------------

    Conference-PBI_200x200


  • 6.  RE: RLS issue - on Power BI service (when Test as a Role)

    Top Contributor
    Posted 24 days ago
    Hi @Ramar Veerasamy,

    I still can't understand the use of Bi-di​ as your AR Team table is filtering your company table, based on the Company ID column, which can be achieved by single direction filters flowing from AR Team table to Company ID.

    With that being said, can you please tell us if you are using PBI Premium and if those 3 users are free users or not?
    It could be possible that since they are free users the 'onmicrosoft' might be coming from the Azure side.
    You will have to talk to your Azure Admin and maybe get it fixed from there.

    I think this could be the reason that you are getting blank reports for the 3 users as their email ids do not match to the ones in your AR Table.
    Or what you can do, if you think it is feasible, change the email ids adding the 'onmicrosoft' in your AR Table itself.

    Hope this helps.

    Thank you,

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------

    Conference-PBI_200x200


  • 7.  RE: RLS issue - on Power BI service (when Test as a Role)

    Bronze Contributor
    Posted 24 days ago
    Edited by Ramar Veerasamy 24 days ago
    Hello @Vishesh Jain,

    As you said correctly. Both 3 user's don't have Power BI Pro licence​. Now they got license. It's working for all.

    If i'm changing the connection from Bi to single direction filter is not passing from AR team table(user Email) to company table. And the RLS security is also not working. (Reason is company to AR Team is one to many relationship - single company has multiple user's)

    ------------------------------
    Ramar Veerasamy
    Associates Reports Developer
    7708177403
    ------------------------------

    Conference-PBI_200x200


  • 8.  RE: RLS issue - on Power BI service (when Test as a Role)

    Top Contributor
    Posted 24 days ago
    Hi @Ramar Veerasamy,

    Please can you change the RLS filter to USERPRINCIPALNAME() and then try the single direction filter.

    To be very honest I really don't see the need for a Bi-di relationship, since the relationship and your RLS, is pretty straighforward​.

    If not, then as long as it works for you and is giving the desired results, you may continue using it.

    Hope this resolves your issue.

    Thank you,

    ------------------------------
    Vishesh Jain
    Owner
    VR Construction
    ------------------------------

    Conference-PBI_200x200