Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

RLS not working with Power BI Service

Hello,   I have a sales report and applied RLS security for salespeople to see just their accounts. The sales rep name is mentioned as the full name, for example, Shaikh, Abdulquadir   I have tri...
  • v-henryk-mstf's avatar
    5 years ago

    Hi Anonymous ,

     

    It should be noted that there is a difference between using the USERNAME() and USERPRINCIPALNAME() functions in Powerbi Desktop and Powerbi Service. In Desktop, the function returns not the UPN of the login account, but the local UPN. When you add a user in Desktop The result returned after the ID is correct, but if the account ID corresponding to the Service is not added in the Powerbi Service, the correct record cannot be displayed. As the above description shows that the result is empty, it illustrates this problem.

     

    Username(),userprincipalname()  return from desktop

     

    Username(),userprincipalname()  return from service

     


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

    Best Regards,
    Henry

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.